contains functions to code/decode JSON