|
|
|
|
|
by kybernetikos
1722 days ago
|
|
I think the main difference between my suggestion and yours is that mine has more brackets. I think type hinting and 'constructors' are basically the same thing, but I like the types to be extensible, so even in your version, I'd make the type hints things that could be provided into the NuJSON.parse function. Obviously, in your version my approach would be sounds: Map {
cow: "moo",
fox: null
},
possibilities: Set ["she loves me", "she loves me not", 42]
I suppose that the idea could be that type hints are entirely ignoreable, and if you strip them the file just becomes normal JSON? |
|
Sending type definitions seems like a good idea. Although at that point it might as well not even be called any kind of JSON.