Hi Larry,
Nice to hear from you.
> Please see a JSON library in Eiffel produced in 4 days flat.
>
> ljr1981/simple_json: A simple JSON parsing library for Eiffel <https://
>
github.com/ljr1981/simple_json>
That's impressive, a lot of material to review.
I just started to read the Readme file and came across this code:
~~~~~~
schema_text: STRING_32
do
Result := "{%
%"type%": %"object%",%
%"properties%": {%
%"name%": {%"type%": %"string%"},%
%"age%": {%"type%": %"integer%", %"minimum%": 0}%
%},%
%"required%": [%"name%"]%
%}"
end
~~~~
This is not valid Eiffel. A string starting with "{ is a verbatim
string, no need to escape new-lines nor quotes. The correct
(and more readable) code should be:
~~~~
schema_text: STRING_32
do
Result := "[
{
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer", "minimum": 0}
},
"required": ["name"]
}
]"
end
~~~~~
--
Eric Bezault
mailto:
er...@gobosoft.com
http://www.gobosoft.com