JSON In Other Languages

One thing that I like about 8th is that it uses JSON format for data types. JSON Path and parsing also work nicely without any additional plugins or libraries. I can also just set how many decimal digits is needed.

ok> { 4: 12345.67891 }

ok> .s

1    m: 0000000003565e90 1  {"4":12345.67891}

ok> 3 ##

ok> .s

1    m: 0000000003565e90 1  {"4":12345.679}

ok> >json

ok> .s

1    s: 0000000003566a20 1  {"4":12345.679}

ok> .
1 Like

In Swift, JSON is simple a format for loading and saving a dictionary, array etc.

1 Like

In Swift, when Doubles rendered JSON values in unexpected ways (not sure if today they does it any more) users stored values as NSDecimalNumber and voilà, they rendered the JSON string as desired.

Why Xojo’s code doesnt handle currency - which would at least be controllable to show 4 digits ? truly no idea

there are alternatives