Port tests\core\encoding\json

This commit is contained in:
Jeroen van Rijn
2024-06-02 14:47:08 -04:00
committed by Feoramund
parent 1b32e27aa4
commit 601df0e8f7
6 changed files with 67 additions and 108 deletions
+2 -2
View File
@@ -62,8 +62,8 @@ Marshal_Options :: struct {
mjson_skipped_first_braces_end: bool,
}
marshal :: proc(v: any, opt: Marshal_Options = {}, allocator := context.allocator) -> (data: []byte, err: Marshal_Error) {
b := strings.builder_make(allocator)
marshal :: proc(v: any, opt: Marshal_Options = {}, allocator := context.allocator, loc := #caller_location) -> (data: []byte, err: Marshal_Error) {
b := strings.builder_make(allocator, loc)
defer if err != nil {
strings.builder_destroy(&b)
}