Handles (de)serialization of JSON