Iterate over Json

34 views
Skip to first unread message

Robson Peixoto

unread,
Dec 1, 2016, 1:33:01 AM12/1/16
to argonaut-json
I'd like to convert an argonaut Json to another Json implementation. I need to do it, because it is a legacy lib developed in Java.
And this json is dynamic. I do not know the possible values in the Json.

How can I iterate it?

Thanks

Gary Pamparà

unread,
Dec 1, 2016, 4:19:20 AM12/1/16
to Robson Peixoto, argonaut-json
You can use the Json#fold function and some kind of recursive call to build the java lib representation

--
You received this message because you are subscribed to the Google Groups "argonaut-json" group.
To unsubscribe from this group and stop receiving emails from it, send an email to argonaut-jso...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robson Roberto Souza Peixoto

unread,
Dec 1, 2016, 6:07:01 AM12/1/16
to Gary Pamparà, argonaut-json
I just need the first level. I need to ignite all objects e transform array in string. Is possible to iterate only the first level ?
--
Robson Roberto Souza Peixoto
Robinho
Master in Computer Science, University of Campinas
IRC: robsonpeixoto
Twitter: http://twitter.com/robinhopeixoto
github: https://github.com/robsonpeixoto

Gary Pamparà

unread,
Dec 1, 2016, 6:29:03 AM12/1/16
to Robson Roberto Souza Peixoto, argonaut-json
All depends on what the "first level" means. You can still use fold and then don't recurse?
Reply all
Reply to author
Forward
0 new messages