Open ipsquare opened 4 years ago
I am curious if there is a tool or utility which can print schema of a given json object. Please advice.
schema
eg.:
const jsonObj = {name: 'apples', quantity: 10, price: 2.5, date: new Date(), in_stock: true}; function printSchema(obj) { // ... return { name: { type: 'UTF8' }, quantity: { type: 'INT64' }, price: { type: 'DOUBLE' }, date: { type: 'TIMESTAMP_MILLIS' }, in_stock: { type: 'BOOLEAN' } } } printSchema(jsonObj)
I am curious if there is a tool or utility which can print
schema
of a given json object. Please advice.eg.: