[#1703] updated json field string data normalizations and fixed the field vizualization in the Admin UI

This commit is contained in:
Gani Georgiev
2023-01-29 12:37:10 +02:00
parent c51148e4d7
commit deccb3dbdb
37 changed files with 174 additions and 81 deletions
+15
View File
@@ -61,6 +61,21 @@
- Added `aria-label` to some of the buttons in the Admin UI for better accessibility ([#1702](https://github.com/pocketbase/pocketbase/pull/1702); thanks @ndarilek).
- Fixed `json` field plain string data normalizations and vizualization in the Admin UI ([#1703](https://github.com/pocketbase/pocketbase/issues/1703)).
In order to support seamlessly both json and multipart/form-data request bodies,
the following normalization rules are applied for plain `json` field string values:
- "true" is converted to the json `true`
- "false" is converted to the json `false`
- "null" is converted to the json `null`
- "[1,2,3]" is converted to the json `[1,2,3]`
- "{\"a\":1,\"b\":2}" is converted to the json `{"a":1,"b":2}`
- numeric strings are converted to json number
- double quoted strings are left as they are (aka. without normalizations)
- any other string (empty string too) is double quoted
Additionally, the "Nonempty" `json` field constraint now checks for `null`, `[]`, `{}` and `""` (empty string).
## v0.11.4