Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
thanks to the explaination of the topic
39421#M11049
i've manage to out a json structured like this :
[ { "key": "1", "key_datas": { "key_date": "2018-06-30T23:02:00" } }, { "key": "2", "key_datas": { "key_date": "1974-06-30T12:30:00" } }, { "key": "3", "key_datas": { "key_date": "2006-09-04T11:30:00" } } ]
but in need to out the "key_date" element as : "date(date_key)"
that mean a full out like this :
[ { "key": "1", "key_datas": { "date(key_date)": "2018-06-30T23:02:00" } }, { "key": "2", "key_datas": { "date(key_date)": "1974-06-30T12:30:00" } }, { "key": "3", "key_datas": { "date(key_date)": "2006-09-04T11:30:00" } } ]
the only ugly solution i've found is to string replace with a tJavarow
String jsonStrReplaced = row3.json; jsonStrReplaced =StringHandling.CHANGE(jsonStrReplaced, "key_date", "date(key_date)"); output_row.jsonStrReplaced = jsonStrReplaced;
do any one has a smarter solution ?
when i try a to name it in tWriteJsonField, i have a
rg.xml.sax.SAXParseException
always possible to find bypass (like You already do), but always better to talk with developers about following standards:
http://jsonapi.org/format/#document-member-names
The following characters MUST NOT be used in member names:
... U+0025 PERCENT SIGN, “%” U+0026 AMPERSAND, “&” U+0027 APOSTROPHE, “’” U+0028 LEFT PARENTHESIS, “(“ U+0029 RIGHT PARENTHESIS, “)” ...
you are really right !!!
but in the true life... that's not always possible 🙂