/** * Creates a new {@code RetrieveFeatureProperties} from a JSON string. * * @param jsonString the JSON string of which the command is to be created. * @param dittoHeaders the headers of the command. * @return the command. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code jsonString} is empty. * @throws org.eclipse.ditto.json.JsonParseException if the passed in {@code jsonString} was not in the expected * format. * @throws org.eclipse.ditto.json.JsonMissingFieldException if the parsed {@code jsonString} did not contain any of * the required fields * <ul> * <li>{@link ThingQueryCommand.JsonFields#JSON_THING_ID} or</li> * <li>{@link #JSON_FEATURE_ID}.</li> * </ul> * @throws org.eclipse.ditto.model.things.ThingIdInvalidException if the parsed thing ID did not comply to {@link * org.eclipse.ditto.model.things.Thing#ID_REGEX}. */ public static RetrieveFeatureDefinition fromJson(final String jsonString, final DittoHeaders dittoHeaders) { return fromJson(JsonFactory.newObject(jsonString), dittoHeaders); }
/** * Creates a new {@code RetrieveFeatureProperties} from a JSON string. * * @param jsonString the JSON string of which the command is to be created. * @param dittoHeaders the headers of the command. * @return the command. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code jsonString} is empty. * @throws org.eclipse.ditto.json.JsonParseException if the passed in {@code jsonString} was not in the expected * format. * @throws org.eclipse.ditto.json.JsonMissingFieldException if the parsed {@code jsonString} did not contain any of * the required fields * <ul> * <li>{@link ThingQueryCommand.JsonFields#JSON_THING_ID} or</li> * <li>{@link #JSON_FEATURE_ID}.</li> * </ul> * @throws org.eclipse.ditto.model.things.ThingIdInvalidException if the parsed thing ID did not comply to {@link * org.eclipse.ditto.model.things.Thing#ID_REGEX}. */ public static RetrieveFeatureDefinition fromJson(final String jsonString, final DittoHeaders dittoHeaders) { return fromJson(JsonFactory.newObject(jsonString), dittoHeaders); }