Closed september669 closed 7 years ago
For example:
@JsonObject public final class Foo { @NonNull @JsonField(name = "camera_model") public String cameraModel;
public void setCameraModel(@NonNull String cameraModel){ this.cameraModel = cameraModel; }
}
And in Foo$$JsonObjectMapper:
@Override public void parseField(CameraDeviceHardware instance, String fieldName, JsonParser jsonParser) throws IOException { if ("camera_model".equals(fieldName)) { instance.setCameraModel(jsonParser.getValueAsString(null)); } .. }
And only if setter not exists Mapper uses direct access to field. Is it correct?
Yes
thx
For example:
@JsonObject public final class Foo { @NonNull @JsonField(name = "camera_model") public String cameraModel;
}
And in Foo$$JsonObjectMapper:
@Override public void parseField(CameraDeviceHardware instance, String fieldName, JsonParser jsonParser) throws IOException { if ("camera_model".equals(fieldName)) { instance.setCameraModel(jsonParser.getValueAsString(null)); } .. }
And only if setter not exists Mapper uses direct access to field. Is it correct?