Code Monkey home page Code Monkey logo

csvstrom's Issues

Duplicate quotes in string value conversion

Currently, when converting quoted string values in a CSV file, csvstrom seems to duplicate quotes.

For instance, for an input CSV file like so:

id,name
"123","navn"

The output JSON file seems to be like so:

[
   {
      "id": "\"123\"",
      "name": "\"navn\""
   }
]

The expected output JSON file would be:

[
   {
      "id": "123",
      "name": "navn"
   }
]

We should probably identify values in-between quotes ("/') as being strings, but remove the quotes before the conversion.
We also need to be careful not to convert "123" (string) to 123 (number).

Duplicated quotes on string conversion

Currently, csvstrom seems to duplicate quotes when converting CSV file values.

For instance, if our input is a CSV file as below:

id,name
"123","navn"

The resulting JSON file will be:

[
   {
      "id": "\"123\"",
      "name": "\"navn\""
   }
]

The expected JSON file would be:

[
   {
      "id": "123",
      "name": "navn"
   }
]

We should probably identify CSV values in-between " or ' as strings, but remove quotes before the actual conversion.
We still need to be careful not to convert "123" (string) to 123 (number).

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.