Coder Social home page Coder Social logo

(I think I) found a bug about jsonexport HOT 6 CLOSED

kaue avatar kaue commented on July 30, 2024
(I think I) found a bug

from jsonexport.

Comments (6)

AckerApple avatar AckerApple commented on July 30, 2024 1

Fix released as version 2.5.0

Please acquire. Please note we are going to a version 3.0.0 soon

from jsonexport.

cbschuld avatar cbschuld commented on July 30, 2024

@pietkamps - just downloaded jsonexport myself and encountered the exact same bug. Specifically if it is an empty value.

from jsonexport.

max-bruhn avatar max-bruhn commented on July 30, 2024

i have encountered the same bug with my empty strings.
#41 (comment)

from jsonexport.

AckerApple avatar AckerApple commented on July 30, 2024

An online demo tool exists for jsonexport and I used it to check the mentioned data call outs.

Online tool link: https://kauegimenes.github.io/jsonexport/demo/

Here is valid JSON for this tickets mentioned issue. It does NOT convert to CSV correctly (bug confirmed)

[
    {
        "day": "1",
        "time": "12:00",
        "persons": [
            {
                "name": "Bob",
                "lastname": "Smith"
            },
            {
                "name": "James",
                "lastname": "piet"
            },
            {
                "name": "",
                "lastname": "Miller"
            },
            {
                "name": "David",
                "lastname": "Martin"
            }
        ]
    }
]

Invalid result line 3 and 4:

day,time,persons.name,persons.lastname
1,12:00,Bob,Smith
,,James,piet
,,David,Miller
,,,Martin

Expected Result for line 3 and 4:

day,time,persons.name,persons.lastname
1,12:00,Bob,Smith
,,James,piet
,,,Miller
,,David,Martin

I don't know when but I will attempt a fix in the near future.

Do you want a fix faster? This code is not that difficult, participate, make a pull request.

NOTE TO SELF: Upgrade demo web page. Don't require just JSON and use eval to cast javascript vars (consider security cost of running eval).

from jsonexport.

kaue avatar kaue commented on July 30, 2024

@pietkamps I finally got a little time to catch up with jsonexport :)
I just opened a PR that fixes this issue #67
@AckerApple can you do a code review?

from jsonexport.

AckerApple avatar AckerApple commented on July 30, 2024

NEW: You should be able to jump to this url to see proof of this fix

from jsonexport.

Related Issues (20)

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.