Split encoding and decoding into their own files. Added json-decode-object-into for greater flexibility.