stanford-oval / sempre

OBSOLETE. The Old Almond parser
Other
0 stars 1 forks source link

Use jackson databind to serialize values to JSON #25

Closed gcampax closed 6 years ago

gcampax commented 8 years ago

The advantage of using jackson databind is that it goes both ways -> to JSON and from JSON.

This way we could compare values as native values instead of Map<String, Object>. Among other things, this would fix the inability of JS to generate numbers that SEMPRE likes: JSON does not distinguish between integers and doubles, but Jackson will read a number as Integer unless it has a .0 at the end, while SEMPRE generates doubles, which means we never recognize a number as correct.

gcampax commented 8 years ago

Ok, almost. jackson-databind by default will deserialize everything as Double. I'm not sure what's going on then with numeric arguments.

gcampax commented 8 years ago

Ugh except no it won't deserialize everything as Double. Stupid documentation is wrong.

gcampax commented 6 years ago

SEMPRE is obsolete, and so is the JSON format.