Should the new settings API use values as strings or as JSON?
johan-bjareholt opened this issue · 2 comments
johan-bjareholt commented
I was fiddling around with the new settings API, thought it was the value was supposed to also be JSON but realized that it was a string.
Here's an example
// This is how it looks
{
"key": "johan.test.test1",
"timestamp": "2020-08-09T17:58:29.672Z",
"value": "test string"
}
// This is how I expected it to look
{
"key": "johan.test.test1",
"timestamp": "2020-08-09T17:58:29.672Z",
"value": { "test": "data" }
}
I think it would make more sense to allow it to be any JSON type than to force it to be an string specifically.
Do you guys agree @ErikBjare and @xylix?
We need to decide on this before we start using the API, otherwise it might become very hard to change.
xylix commented
I think we discussed it at some point but I've already forgotten the details. I think objects make sense as well, it will just be a less exact struct.