Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usage with HTTPClient ? #47

Open
net1957 opened this issue Jul 12, 2013 · 0 comments
Open

usage with HTTPClient ? #47

net1957 opened this issue Jul 12, 2013 · 0 comments

Comments

@net1957
Copy link

net1957 commented Jul 12, 2013

I'm trying to use HTTPClient and aJson in the same sketch. (both from master branch on github)

But HTTPClient use FILE* and aJson use Stream

I can't find a way to use the stream from a HTTPClient getURI to feed a aJson.parse

The example don't work:

HTTPClient client ("192.168.0.x", server, 4567);
FILE* result = client.getURI( UNREAD_URI, NULL, NULL );
aJsonObject* jsonObject = aJson.parse(result);

generate the compilation error:

no matching function for call to 'aJsonClass::parse(__file*&)
aJSON.h:179: note: candidates are: aJsonObject* aJsonClass::parse(aJsonStream*)
aJSON.h:180: note:                 aJsonObject* aJsonClass::parse(aJsonStream*, char**)
aJSON.h:181: note:                 aJsonObject* aJsonClass::parse(char*)

If I create a string from the HTTP stream and feed it to the parse method, it work.

Any idea to resolve this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant