karver icon indicating copy to clipboard operation
karver copied to clipboard

The Value data type is too limited

Open mohsen3 opened this issue 9 years ago • 3 comments

I wonder why the Object constructor in the Value data type holds a map of Text to Text, not Text to Values?

data Value = Literal Text | Object (HashMap Text Text) | List   (Vector Value)

It does not allow nested objects and is too limited for many use cases. I wonder if it is on purpose of something that can be considered as an improvment?

mohsen3 avatar Mar 09 '16 18:03 mohsen3

I believe it was because the parser doesn't support object values passed the first. I haven't touched this project in quite a while so I'm not sure I will get to supporting Object containing Value anytime soon.

sourrust avatar Mar 13 '16 05:03 sourrust

Does the json input support nested objects?

mohsen3 avatar Mar 14 '16 19:03 mohsen3

This is both a yes and no. The library I use for dealing with JSON is aeson and that does deal with nested object, but internally these JSON object convert to a Value and that ends up not supporting nesting.

sourrust avatar Mar 20 '16 16:03 sourrust