main.js datatype from text to json