diff --git a/internal/decoder/consts/option.go b/internal/decoder/consts/option.go index f916f650f..f709baf0e 100644 --- a/internal/decoder/consts/option.go +++ b/internal/decoder/consts/option.go @@ -12,9 +12,11 @@ const ( F_disable_unknown = 3 F_copy_string = 4 + F_use_number = types.B_USE_NUMBER F_validate_string = types.B_VALIDATE_STRING F_allow_control = types.B_ALLOW_CONTROL + F_no_validate_json = types.B_NO_VALIDATE_JSON ) type Options uint64 @@ -26,6 +28,7 @@ const ( OptionDisableUnknown Options = 1 << F_disable_unknown OptionCopyString Options = 1 << F_copy_string OptionValidateString Options = 1 << F_validate_string + OptionNoValidateRawJSON Options = 1 << F_no_validate_json ) const ( diff --git a/internal/decoder/jitdec/decoder.go b/internal/decoder/jitdec/decoder.go index ab7164690..bbb4b4b61 100644 --- a/internal/decoder/jitdec/decoder.go +++ b/internal/decoder/jitdec/decoder.go @@ -25,6 +25,7 @@ const ( _F_disable_urc = consts.F_disable_urc _F_use_int64 = consts.F_use_int64 _F_use_number = consts.F_use_number + _F_no_validate_json = consts.F_no_validate_json _F_validate_string = consts.F_validate_string ) diff --git a/internal/native/types/types.go b/internal/native/types/types.go index 9acc5b8c0..4d7af4df8 100644 --- a/internal/native/types/types.go +++ b/internal/native/types/types.go @@ -57,6 +57,9 @@ const ( B_USE_NUMBER = 1 B_VALIDATE_STRING = 5 B_ALLOW_CONTROL = 31 + + // for native.SkipOne() flags + B_NO_VALIDATE_JSON= 6 ) const ( diff --git a/native/types.h b/native/types.h index 196923b09..251907589 100644 --- a/native/types.h +++ b/native/types.h @@ -21,6 +21,7 @@ #define F_DBLUNQ (1 << 0) #define F_UNIREP (1 << 1) +#define F_NO_VALIDATE_JSON (1 << 6) #define VS_NULL 0x6c6c756e // 'null' in little endian #define VS_TRUE 0x65757274 // 'true' in little endian