decode first, than don't need to decode again
write into json file in right way
add comments