Encoding file's meta data into a json string.