Skip to content
This repository was archived by the owner on Jan 12, 2023. It is now read-only.
This repository was archived by the owner on Jan 12, 2023. It is now read-only.

What if it is a array of strings? #51

Description

@AbhishekLYK

I have an array of strings in my json like following...
{"userId":1, "rooms":["4","2","3]}

And I declared json like
-json({user, {string, "userId"},{list,"rooms",[{default,[ ]]}}})

but it is giving me error when trying to use to_json method

[Reason : {{case_clause,{error,"rooma",throw,{invalid_list_item,<<"4">>}}},[{ejson_encode,convert,5,[{file,"src/ejson_encode.erl"},{line,80}]},{ejson_encode,encode1,3,[{file,"src/ejson_encode.erl"},{line,53}]},{ejson_encode,encode,3,[{file,"src/ejson_encode.erl"},{line,32}]},{ejson,to_json,3,[{file,"src/ejson.erl"},{line,82}]}, .............

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions