<< jsonencode | JavaScript Object Notation |
res = jsonprettyprint(txt) |
a valid JSON text.
a string: a formatted JSON text (human readable).
jsonprettyprint formats a JSON text string to be human readable.
field1 = 'f1'; value1 = zeros(1,10);
field2 = 'f2'; value2 = {'a', 'b'};
field3 = 'f3'; value3 = {pi, pi*pi};
field4 = 'f4'; value4 = {'fourth'};
s = struct(field1,value1,field2,value2,field3,value3,field4,value4);
r = jsonencode(s)
jsonprettyprint(r)
jsondecode, jsonencode, filewrite.
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET