Closed tanthammar closed 2 years ago
May I suggest to add isJson()
in the options
area of README.md?
Edit: there also seems to be an issue with saving, escaping all characters (even in tree view)
Update: The problem with saving happens if there are Unicode characters in any of the fields.
This PR allows the field to accept pure JSON data. This is the case if you have a model that casts the field to json.
In FooModel
Adds an
isJson(bool $state = true)
method to the field. Example:This is a non-breaking change as the
bool $jsonFormatted
property is set to false by default.TODO It seems like the editor doesn't like other modes than
['tree', 'view']
if it receives json formatted data. Don't know if this is the case for other data formats as well. In my opinion I am fine with this limitation, a note added to the docs would be sufficient to cover the topic.