Giter Site home page Giter Site logo

MapSet parsing problems about exdn HOT 4 CLOSED

boxxxie avatar boxxxie commented on September 28, 2024
MapSet parsing problems

from exdn.

Comments (4)

psfblair avatar psfblair commented on September 28, 2024

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.

from exdn.

boxxxie avatar boxxxie commented on September 28, 2024

could an issue be that I'm using tuples?

from exdn.

psfblair avatar psfblair commented on September 28, 2024

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.

from exdn.

boxxxie avatar boxxxie commented on September 28, 2024

Thanks for your replies. i've stopped using tuples. :)

from exdn.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.