-
Notifications
You must be signed in to change notification settings - Fork 2
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
MapSet parsing problems #2
Comments
How are you printing out the output? Note that Elixir has two string formats, one of which is called a binary (see http://elixir-lang.org/getting-started/binaries-strings-and-char-lists.html). If you are using iex to output the edn you'll get the angle-bracket notation because the strings are in binary format. However, just outputting the edn to a variable and then reading back in from that variable shouldn't give you the problem you see. (I believe there are tests that establish that.) If that's a problem, then there's something wrong. I believe IO.puts will give you a string output that doesn't contain the angle brackets. |
could an issue be that I'm using tuples? |
I don't believe there is any conversion from Elixir tuples to edn, since edn doesn't have a tuple type. However, the angle brackets almost certainly comes from the way Elixir represents a binary string format when inspected. You'll get those if you write to edn in a format that doesn't recognize those as strings, and then when you attempt to read back the serialized edn with the angle brackets you'll get the problem you see. |
Thanks for your replies. i've stopped using tuples. :) |
i write out a mapset to edn, then read it back from edn, and they don't look the same
edn
when i read it back in i get
i don't understand why there are
<<
and>>
in my file. seems like very erlang like things.i expect the output to be only edn format,
The text was updated successfully, but these errors were encountered: