NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Show HN: Datamorph – A clean JSON ⇄ CSV converter with auto-detect (datamorphio.vercel.app)
cobertos 74 days ago [-]
Tried it on a 9.9MB json file I have. Seemed to handle the size fine, but the output was nothing like what I would want. I made a smaller version of what I uploaded in the below pastebin and the output.

The data is TLD data so it should have at least given me the "com", "net", "..." part

Input

https://pastebin.com/QAWeu8Xt

Output

    category,addedToListPrice,appliesToCustomers,amountRateType,amountRate,type
    fee_tax,false,eu,percent-varies-by-location,~,vat
    fee_tax,false,in,percent,15,gst
    fee_tax,false,au,percent,10,gst
    fee_tax,false,eu,percent-varies-by-location,~,vat
An explanation of _how_ it does the conversion would be nice when choosing a tool like this. As the "just works" didn't seem to work.
sumit_entr42 72 days ago [-]
Sorry for this incorrect output. Earlier my code wasn't compatible with deep nested Json. Thanks for pointing that out and now I have successfully modified codebase to support the similar JSONs. You can try it out!!

Please feel free to report any more obstacle in app experience.

kihyug6i 74 days ago [-]
Your api keys are public
cluckindan 74 days ago [-]
I love the smell of vibe coding in the morning.
hermitcrab 73 days ago [-]
No engagement from the OP. I guess they are already vibe coding their next masterwork?
74 days ago [-]
hermitcrab 74 days ago [-]
I tried converting this:

[

  {

    "name": "Avocado Dip",

    "carb": 2,

    "cholesterol": 5,

    "fiber": 0,

    "minerals": {

      "ca": 0,

      "fe": 0

    },

    "protein": 1,

    "sodium": 210,

    "vitamins": {

      "a": 0,

      "c": 0

    }

  }
]

And I got:

name,carb,cholesterol,fiber,minerals,protein,sodium,vitamins

Avocado Dip,2,5,0,"{""ca"":0,""fe"":0}",1,210,"{""a"":0,""c"":0}"

Which is not what I would expect.

sumit_entr42 72 days ago [-]
Sorry for the inconvenience. The problem was that my logic was working for few working types and sets of json. So, it wasn't able to recognize your need. So now I have made the logic more robust, so it can handle wide range of json types.

Thanks for feedback. Have a Good Day!!

zerratar 74 days ago [-]
{ "data": { "field1": "hello", "test": [ "what", "is", "this" ] }, "something": "yay" }

becomes

data,something [object Object],yay

I already knew complex types / nested objects would not work. but what makes json stronger than csv is that you can handle more complex data types and most people will use json that way too. Otherwise json would just be a less bloated xml, which is a less bloated csv. lol

louiechristie 74 days ago [-]
No unit tests.
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 09:26:02 GMT+0000 (Coordinated Universal Time) with Vercel.