Implemented [brl.json], will it become cerberus.json upon changing?

Holzchopf

Moderator
Staff member
Joined
Jul 31, 2017
Likes
152
Location
Bern, Switzerland
#1
Hi folks

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:

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Likes
427
Location
Germany
#2
Switching it to cerberus would break things for sure. And THEN you would have to switch it for all the modules inside BRL. Only that would make sense. Or creating CX2 :) BUT, would an alias named brl pointing to cerberus do the trick? I am also thinking if this would work with Makedocs. That would have to be tested.
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Likes
427
Location
Germany
#4
Btw. Inside Cerberus you find only modules that deal with the basic CX language. Not something like JSON or XML.

I would rather put it into its own folder.
 

Holzchopf

Moderator
Staff member
Joined
Jul 31, 2017
Likes
152
Location
Bern, Switzerland
#5
If no one is going to blame brl for a well-documented module, I leave it in brl ;-)

only modules that deal with the basic CX language
You're right. It didn't notice that. Only saw that there were some modules in cerberus and assumed at some point someone started to port things from brl to cerberus and this was an ongoing process. But thanks for the clarification =)
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Likes
427
Location
Germany
#6
Like said, I would place it into its own folder.

Code:
modules
    |
    + brl
    + cerberus
    + json
    + ...
 
Top Bottom