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

Json parser how to #4

Open
badoet opened this issue Jul 6, 2014 · 1 comment
Open

Json parser how to #4

badoet opened this issue Jul 6, 2014 · 1 comment

Comments

@badoet
Copy link

badoet commented Jul 6, 2014

hey, i stumbled upon hydrogen when i was looking for a gd json parser for unity3d
looking through the source code i can see that it support parsing to long
long is often skipped by most of the json library out there. so im glad i finally found it here.

problem is, i kind find any documentation on how to use this library.
how to parse the json string to JSONObject and retrieve the property from it?
like JSONObject obj
long bigNumber = obj["propertyname"];

EDIT
I have figured out on how to convert json string to JSONObject. and i have added my own ToLong function in JSONObject

my next problem is how to convert json array into list of JSONObject.
thx

@reapazor
Copy link
Contributor

Hey!

My apologies for not getting to this sooner, the JSON part is very limited in scope ... in the sense it really doesn't handle array of arrays very well inside of a json payload. I've had to create very specific cases to handle it, or I use a more flushed out JSON library.

This really was meant for quick, simple JSON (unfortunately).

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

2 participants