Closed ghost closed 8 years ago
BTW: There seems to be a bug in the error message - shouldn't identifier
be a value?
FoundNil("Key: .KeyPath(identifier) TargetType: String")
@innoreq sorry I missed this one, and I'm getting here so late. Can you post the model code?
Thanks for your feedback. Unfortunately, I cannot reconstruct the problem anymore, as we changed from JSON to a database solution in the meantime.
@innoreq thanks, I'll close this for now.
I have a custom data structure, with DM_ModelRoot as root item. Writing to a JSON string is working fine:
However, when trying to restore the JSON string, there is an error
UnableToMap(.KeyPath(modelRoot), Genome.SequenceError.FoundNil("Key: .KeyPath(identifier) TargetType: String"))
:What am I doing wrong?
Note: DM_ModelRoot is setup with init(...) and sequence(...) properly, the JSON string is created correctly.
BTW: It would be helpful to have examples for correctly reading and writing JSON from and into custom objects on the documentation page ;-)