You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using JSONObject in classes with annotation @ExportedBean works fine except when there is a field with null value.
Having a field with null value is correct in JSON format. So JSONObject with JSONNull should be exportable as other JSONObject.
The exception raised is:
org.kohsuke.stapler.export.NotExportableException: class net.sf.json.JSONNull doesn't have @ExportedBean
at org.kohsuke.stapler.export.Property.writeValue(Property.java:298)
at org.kohsuke.stapler.export.Property.writeValue(Property.java:168)
at org.kohsuke.stapler.export.Property.writeValue(Property.java:266)
at org.kohsuke.stapler.export.Property.writeValue(Property.java:168)
at org.kohsuke.stapler.export.Property.writeTo(Property.java:153)
at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:223)
at org.kohsuke.stapler.export.Model.writeTo(Model.java:194)
at org.kohsuke.stapler.export.Model.writeTo(Model.java:214)
at org.kohsuke.stapler.export.Model.writeTo(Model.java:182)
Using JSONObject in classes with annotation
@ExportedBean
works fine except when there is a field with null value.Having a field with null value is correct in JSON format. So JSONObject with JSONNull should be exportable as other JSONObject.
The exception raised is:
PR with test to reproduce the issue: #173
The text was updated successfully, but these errors were encountered: