Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

GSON comes to ZPE

I've finally brought JSON support to ZPE. 

ZPE 1.5.0 will bring JSON support and will also focus on adding XML parsing tools to the mix. Currently version 1.5.0 uses the GSON library to add JSON parsing capabilities but I do intend to replace it with my own JSON parsing application at some point, since GSON brings the size of ZPE up to 500KB from just 300KB and I can't justify this. However, the change will only be a back end change when it comes and all applications will perform the same way if they are written to use the JSON functions currently provided. Consider GSON a placeholder.

Here's a small sample that takes the JSON from my own http://code.jamiebalfour.scot/balfblog/info.json file that I use to share updates to BalfBlog:

ZenLang
$json_string = '[ {"name" : "BalfBlog", "version" : "2.2.1", "version_name" : "Klebb", "last_update" : "12-2016" } ]'
$map = json_to_map($json_string)
$name = $map.get("name")
print($name)

If we now look at what is output we should get the word BalfBlog. 

gson
json
parse
parsing
engine
zenith
zpe
Comments
Powered by DASH 2.0