I found out that read-json accepts /* */ style comments. see sample code
I'm using oe11.3.2.
Is this supported ?
AFAIK there is no standard comment mechanism in json. See also http://stackoverflow.com/questions/244777/can-i-comment-a-json-file
Sample code
define temp-table tRow no-undo
field RowName as character
field RowValue as character
field RowCount as integer
.
define variable lchar as longchar no-undo initial '
~{"tRow":[
~{"RowName":"first","RowValue":"string","RowCount":"1"~},
~{"RowName":"second",/*"RowValue":"in comment",*/"RowCount":"2"~},
/*
~{"RowName":"third","RowValue":"string","RowCount":"3"~},
*/
~{"RowName":"fourth","RowValue":"fit the","RowCount":"4"~},
]~}
'.
temp-table tRow:read-json("longchar", lchar).
for each tRow:
disp tRow.
end.
Carl,
I heard back from development and this functionality is supported. It was added in 10.2B02 and 11.0.
I will submit a bug to get the documentation updated.
Sincerely, Brian Maher
Carl,
Just a quick update to let you know that I am checking with development on this but for now, given that this behavior is not documented, I would not rely on it working in the future.
Sincerely, Brian Maher
Carl,
I heard back from development and this functionality is supported. It was added in 10.2B02 and 11.0.
I will submit a bug to get the documentation updated.
Sincerely, Brian Maher