- Joined
- Jul 31, 2017
- Messages
- 500
Hi folks
I'm going to add a type identifier to the JsonValue base class. Probably as Property, e.g.
Why? Because for now, the only way of finding out what specific type a JsonValue is, is by trying to cast it to that specific class.
On top of that, I'm going to update the whole documentation for that module including comments in the source.
Now, my suggestion / suggestive question:
Will brl.json become cerberus.json due to that? No "standard" module (meaning none of those shipped with CX) imports brl.json - so the risk of dependency conflicts is reduced to third party modules. My motivation to re-scope it from brl to cerberus is to make clear that this won't be maintained by brl any more.
edit
Well the consts will more likely be named OBJECTTYPE, ARRAYTYPE and so on because the others are reserved keywords
I'm going to add a type identifier to the JsonValue base class. Probably as Property, e.g.
Code:
' returns specific type of value, is one of
' JsonValue.OBJECT
' JsonValue.ARRAY
' JsonValue.NULL
' JsonValue.BOOL
' JsonValue.NUMBER
' JsonValue.STRING
Method Type:Int() Property
Why? Because for now, the only way of finding out what specific type a JsonValue is, is by trying to cast it to that specific class.
On top of that, I'm going to update the whole documentation for that module including comments in the source.
Now, my suggestion / suggestive question:
Will brl.json become cerberus.json due to that? No "standard" module (meaning none of those shipped with CX) imports brl.json - so the risk of dependency conflicts is reduced to third party modules. My motivation to re-scope it from brl to cerberus is to make clear that this won't be maintained by brl any more.
edit
Well the consts will more likely be named OBJECTTYPE, ARRAYTYPE and so on because the others are reserved keywords
Last edited: