AykutSarac / jsoncrack.com

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML, CSV and more, into interactive graphs.
https://jsoncrack.com/
Other
30.5k stars 1.89k forks source link

ability to specify type of data instead of data itslef #254

Closed dolev146 closed 7 months ago

dolev146 commented 1 year ago

Feature

i use jsoncrack to model my json data visually

in SQL you use the table definitions to model the data like this

create table Persons { id INT AUTO INCRENENT, age INT, name VARCHAR(50) .... };

I want to be able to write the data type (string , int , long .... )

to the json because I don't really have the correct data

image

I want this to work :) please if possible

Alternative solutions or implementations

No response

Other context

No response

victorbrambati commented 1 year ago

The JSON is key and value and not key, type and value. In the value you need add quotation marks { "students": [ { "name": "string", "age": "int", "grade": "int" } ] }

If you want key, type and value in the graph you can create parent node object, example: { "students": [ { "name": { "type": "string", "value": "Dolev" }, "age": { "type": "int", "value": 25 }, "grade": { "type": "int", "value": 6 } } ] }