Fix boolean deserialization
parent
e8cd08cb4c
commit
fb6d4fdede
|
@ -446,7 +446,7 @@ namespace ln.json.mapping
|
|||
DefaultMapper.Add(new JSONMapping(
|
||||
typeof(bool),
|
||||
(JSONMapper arg1, object arg2) => ((bool)arg2) ? (JSONValue)JSONTrue.Instance : (JSONValue)JSONFalse.Instance,
|
||||
(JSONMapper arg1, JSONValue arg2) => (arg2.ValueType == JSONValueType.TRUE) || (arg2.ValueType == JSONValueType.FALSE) ? false : throw new NotSupportedException()
|
||||
(JSONMapper arg1, JSONValue arg2) => (arg2.ValueType == JSONValueType.TRUE) ? true : false
|
||||
));
|
||||
|
||||
DefaultMapper.Add(new JSONByteArrayMapping());
|
||||
|
|
Loading…
Reference in New Issue