Closed peterhellberg closed 6 years ago
It is valid JSON, just not an object.
And support for JSON values would make it more convenient to change a single value with a PUT request. Otherwise you would have to PUT an object to the parent element with a key for the given value.
My bad, I'm sorry
@peterhellberg this issue should be fixed in https://github.com/bluzi/jsonstore/pull/12. body-parser
was in strict mode, with takes only array and object json values.
@akshendra Ok, good. (Please correct the spelling in the error message)
@peterhellberg Can you verify it's solved?
@bluzi The two failing requests in this issue are still failing with an Internal Server Error.
PUT with a JSON object against the parent object work though. It would just be more convenient to be able to PUT a JSON value directly.
curl -X PUT -H 'Content-Type: application/json' -d '{"b":false}' https://www.jsonstore.io/1ba7860f742fc15d5b6e1508e2de1e0cde2c396f7c52a877905befb4e970eaaf/an-object
curl -X PUT -H 'Content-Type: application/json' -d 'false' https://www.jsonstore.io/1ba7860f742fc15d5b6e1508e2de1e0cde2c396f7c52a877905befb4e970eaaf/an-object/b
Both requests result in a 500:
Using a JSON object work just fine: