You are not logged in.
Pages: 1
Hey ab,
SQLite accepts it, and many other validators accept JSON with names without double quotes and with the dollar symbol ($).
Shouldn't we accept it too?
For example:
var s := '{item$one:1,item$two:1,item$three:1}';
var dv: TDocVariantData;
dv.InitJson(s);
s := dv.ToJson;
//the value of s is: '{"item":1,"item":1,"item":1}'
The change would be in the file mormot.core.json
if c in ['_', '0'..'9', 'a'..'z', 'A'..'Z', '.', '[', ']', '$'] then
include(JSON_CHARS[c], jcJsonIdentifier);
Could it be?
Offline
Good idea!
Since '$' is already in jtIdentifierFirstChar and jcJsonIdentifierFirstChar, I guess we could add it to jcJsonIdentifier too.
Please try with
https://github.com/synopse/mORMot2/commit/aaf06cf8c
Offline
Great
There's only one fix left (at least in Delphi 12).
[dcc32 Error] mormot.core.base.pas(9905): E2003 Undeclared identifier: 'GetCurrentThreadId'
[dcc32 Fatal Error] F2063 Could not compile used unit 'mormot.core.base.pas'
Offline
Fixed a few commits ago:
https://github.com/synopse/mORMot2/comm … bb7fb99de6
Offline
Pages: 1