added utility methods for deserializing JSON input.