Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

z_convert: Don't convert binary tuple key to {array, ...} #14

Closed
wants to merge 1 commit into from

Conversation

ddeboer
Copy link
Member

@ddeboer ddeboer commented Mar 5, 2016

No description provided.

@@ -321,7 +321,7 @@ to_json([{X, Y}]) when is_atom(X) ->
to_json([{X, Y} | Z]) when is_atom(X) ->
{struct, to_json_struct([{X, Y} | Z])};
to_json(X) when is_list(X) ->
case z_string:is_string(X) of
case z_string:is_string(X) or is_binary(X) of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X can't be a binary as there is a is_list guard on the function above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, whoops. This did seem to solve the problem for me. I’ll look into it further!

@arjan arjan closed this Jun 21, 2016
@ddeboer ddeboer deleted the binary-key-array branch June 1, 2017 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants