/** * Creates a new {@code SudoRetrieveThingResponse} from a JSON string. * * @param jsonString the JSON string of which a new SudoRetrieveThingResponse instance is to be created. * @param dittoHeaders the optional command headers of the request. * @return the {@code SudoRetrieveThingResponse} which was created from the given JSON string. * @throws NullPointerException if {@code dittoHeaders} is {@code null}. * @throws DittoJsonException if the passed in {@code jsonString} was {@code null}, empty or not in the expected * 'SudoRetrieveThingResponse' format. */ public static SudoRetrieveThingResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders) { final JsonObject jsonObject = DittoJsonException.wrapJsonRuntimeException(() -> JsonFactory.newObject(jsonString)); return fromJson(jsonObject, dittoHeaders); }
/** * Creates a new {@code SudoRetrieveThingResponse} from a JSON string. * * @param jsonString the JSON string of which a new SudoRetrieveThingResponse instance is to be created. * @param dittoHeaders the optional command headers of the request. * @return the {@code SudoRetrieveThingResponse} which was created from the given JSON string. * @throws NullPointerException if {@code dittoHeaders} is {@code null}. * @throws DittoJsonException if the passed in {@code jsonString} was {@code null}, empty or not in the expected * 'SudoRetrieveThingResponse' format. */ public static SudoRetrieveThingResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders) { final JsonObject jsonObject = DittoJsonException.wrapJsonRuntimeException(() -> JsonFactory.newObject(jsonString)); return fromJson(jsonObject, dittoHeaders); }