Categories &

Functions List

Function Reference: __json2dictionary__

datatypes: [tree, errmsg] = __json2dictionary__ (text, comments, commas, infnan)

Parse JSON text into a tree that keeps the kinds of JSON values.

An object is a scalar structure with the fields keys and values, two column cell arrays in file order, duplicate keys kept. An array is a column cell array, text a character row, a number a double, or an int64 or uint64 for an integer beyond 2^53 that one holds exactly, true and false logical scalars, and null a 0-by-0 structure array with no fields. comments, commas and infnan allow comments, trailing commas and the non-finite numbers. On an error tree is empty and errmsg names it with its line and column.

This is a helper IO function for the readdictionary function. Do NOT call it directly.

Source Code: __json2dictionary__