Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data.Value isn't an object? #121

Open
harboe opened this issue Aug 3, 2016 · 2 comments
Open

Data.Value isn't an object? #121

harboe opened this issue Aug 3, 2016 · 2 comments

Comments

@harboe
Copy link

harboe commented Aug 3, 2016

Hi,

Shouldn't the Data.Value be an object, currently it's a string. In order to properly assign; int, arrays, bool, etc. you have to use the SetValue("value", true) to enforce the correct serialization. Wouldn't it be easier it the Data.Value just was an object? or I'm missing something?

Best regards

Dennis

@glennblock
Copy link
Member

glennblock commented Aug 4, 2016

It make sense that it should be object, but the value would have to be type checked to ensure it matches the spec. Array does not appear to be a supported value type yet.

7.6. VALUE
A VALUE data type MUST be a NUMBER, STRING, or one of the following literal names: false, null, or true.

NOTE: This release of Collection+JSON does not support OBJECT or ARRAY as a valid VALUE.

@mamund is that correct?

@mamund
Copy link

mamund commented Aug 4, 2016

in this release of Cj, data.value is not an object. You can, however, extend Cj by adding an object property (data.object). there may already be some Cj extensions that do this, too.

check out the cj extensions list and, if you don't see what you think you need, feel free to start a new extension and, as long as it is backward compatible, we can register it for others to use, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants