Details
-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
2.0
-
Security Level: Public
-
Untriaged
Description
Currently we allow a valid JSON object to be created with an Array as the root object.
When editing the Document from the GUI the is an error and the object can not be changed.
{'EXIT',{badarg,[{erlang,iolist_to_binary, [[{[
{<<"gameLevel">>,1},
{<<"rows">>,8}]}, {[
{<<"gameLevel">>,2},
{<<"rows">>,10}]}]]},
{couch_doc,to_raw_json_binary_views,1},
{capi_crud,update_doc,3},
{rpc,local_call,3},
{capi_frontend,attempt,6},
{capi_frontend,update_doc,3},
{couch_httpd_db,update_doc,5},
{couch_httpd,handle_request,6}]}}
Example doc:
[
,
{ "gameLevel": 2, "rows": 10 }]