mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-06 12:07:25 +01:00
updated json field validator and allow duplicated keys when serializing record models
This commit is contained in:
1 parent
57c0b034e6
commit
75c6a4fd1f
10 files changed
+81
-22
No files matched your search
@@ -1333,7 +1333,9 @@ func (m Record) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(
|
||||
m.PublicExport(),
|
||||
json.Deterministic(true),
|
||||
// to preserve the old jsonv1 behavior in case of invalid data
|
||||
// for compliance with old data (and slightly better performance)
|
||||
jsontext.AllowDuplicateNames(true),
|
||||
// preserve the old jsonv1 behavior in case of invalid data
|
||||
jsontext.AllowInvalidUTF8(true),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user