Closed ftomassetti closed 6 months ago
Yes, currently I assume that the JSON is valid LionWeb. The plan is to use the validation package from lionweb-typescript
. to validate the incoming JSON. And reject the call if the JSON is incorrect.
The specific case you describe will then be rejected because of invalid JSON.
I just added the LionWeb JSON validation to the API in If there is a validation error (i.e. the JSON is not LionWeb compliant) the api call will return status = 400 to indicate an error.
Validation of JSON is done for the store request in the main branch
I tried uploading a tree where a node had itself listed as a child. I could store such tree, but when retrieving the tree I got a stack overflow. We may need to prevent such trees to be stored.