christophe.meurice Posted January 24, 2014 Share Posted January 24, 2014 I've wrote a Json parser for my company in Unigine script ... Limitations : - Not very tested (may contains bugs) - No support for utf8 for now (planned) string st = "{\"1\" : 1.0,\"2\":\"Lorem ipsum\",\"3\":{\"1001\":[1,2,\"dolor sit amet\"],\"1002\":4.0, \"1003\":\"consectetuer adipiscing elit\"}}"; Json::JSonValue v = Json::parse(st); Unigine::Map m; Json::JSonValue s; Unigine::Vector a; m = v.getObject(); s = m.get("3"); m = s.getObject(); s = m.get("1001"); a = s.getArray(); s = a.get(2); log.message("%s", s.getString()); // Lorem ipsum s = v.getFromObjectKey("3"); s = s.getFromObjectKey("1001"); s = s.getFromArrayAt(2); log.message("%s", s.getString()); // dolor sit amet Hope it could be usefull for anyone or even integrated in Unigine :) json.tar.gz Link to comment
christophe.meurice Posted January 28, 2014 Author Share Posted January 28, 2014 New version with utf8 support : Here Link to comment
ivan.cuevas Posted January 29, 2014 Share Posted January 29, 2014 you're the best B) :P Link to comment
ivan.cuevas Posted March 2, 2014 Share Posted March 2, 2014 We are currently testing a new version much, much, much... faster. As soon as we can, we will share it with all of you. Link to comment
manuel.gysin Posted April 21, 2014 Share Posted April 21, 2014 Hello Ivan Cuevas New version done? :) Link to comment
ivan.cuevas Posted April 21, 2014 Share Posted April 21, 2014 Yes, it's finished. We are going to prepare a release soon ;) Link to comment
ivan.cuevas Posted April 22, 2014 Share Posted April 22, 2014 Here is the new version. We had to introduce some changes in the syntax, sorry for the inconveniences. We hope you find it as useful as it is for we. json.tar Link to comment
Recommended Posts