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
Ahh, I see, empty string is not valid JSON, so probably jsonista implementation is more correct than cheshire.
Good way to see if your project code if JSON-compliant though 馃う
Yes, it's a property of Jackson. There are lot of features that can be set, but with a quick test, at least this doesn't work:
(defallow-nil-object-mapper
(doto (j/object-mapper)
(.enable com.fasterxml.jackson.databind.DeserializationFeature/ACCEPT_EMPTY_STRING_AS_NULL_OBJECT)))
(j/read-value"" allow-nil-object-mapper)
; Execution error (MismatchedInputException) at com.fasterxml.jackson.databind.exc.MismatchedInputException/from (MismatchedInputException.java:59).; No content to map due to end-of-input; at [Source: (String)""; line: 1, column: 0]
Would also like to know if there is existing thing for this in Jackson or would it require custom Java/Clojure code in jsonista.
Is that intentional? Cheshire returns
nil
for such case. Maybe that can be tuned withobject-mapper
? 馃The text was updated successfully, but these errors were encountered: