google-protobuf 4.28.2 → 4.29.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50f7cd8abfe74257e6fa183325ec76d6590fa2e650139a7e8c06be67b1a37265
4
- data.tar.gz: f19365b4373475b2c7d7570aceaa993cb0718fe37525ca392df3a2629dc48f85
3
+ metadata.gz: 348adc047870ec167a60d9eb6f1e6a908f7c9e853e14eb219bc20fa074a7061d
4
+ data.tar.gz: f496b9914e0e71ae82c3ca75efe7111ee8cb68bae54b71b051b28d09dc5ee6b0
5
5
  SHA512:
6
- metadata.gz: cb6543ae37709a2a1e57498a2c4125bf1f8dca38efb0e80ca65389e34ef2a9b7613a5a57923d485f4dc0011bfe37a538480d1e2e999eb0f84945a10bef561c10
7
- data.tar.gz: 051b5e72dc158ecb34e8a0627be5e7efe17245f1c6be5487d8c04ff746701138a62439e479633c0479f722c62d694b6ca5f32f06193e341f8067759c187aa578
6
+ metadata.gz: 5a3e9a110007df61109ae34af8582b5333aa3b2f069377ff305f2acd8e540aaf50dc8930403eb72c777e4252fa82508559814977f0065cdbc34c099bf6a2e6d2
7
+ data.tar.gz: 2c1d7253020ee2bb238ef2a5b04fd722cfde1141a24ed41df6ac2906dff2a709eb1637d7053b4b5d22394dd8b03f7e26ff995f16c3573b86dc4b712d4eaee5f5
@@ -7,7 +7,6 @@
7
7
 
8
8
  #include <ctype.h>
9
9
  #include <errno.h>
10
- #include <ruby/version.h>
11
10
 
12
11
  #include "convert.h"
13
12
  #include "message.h"
@@ -1038,11 +1038,21 @@ static VALUE Message_decode_json(int argc, VALUE* argv, VALUE klass) {
1038
1038
 
1039
1039
  upb_Status_Clear(&status);
1040
1040
  const upb_DefPool* pool = upb_FileDef_Pool(upb_MessageDef_File(msg->msgdef));
1041
- if (!upb_JsonDecode(RSTRING_PTR(data), RSTRING_LEN(data),
1042
- (upb_Message*)msg->msg, msg->msgdef, pool, options,
1043
- Arena_get(msg->arena), &status)) {
1044
- rb_raise(cParseError, "Error occurred during parsing: %s",
1045
- upb_Status_ErrorMessage(&status));
1041
+
1042
+ int result = upb_JsonDecodeDetectingNonconformance(
1043
+ RSTRING_PTR(data), RSTRING_LEN(data), (upb_Message*)msg->msg,
1044
+ msg->msgdef, pool, options, Arena_get(msg->arena), &status);
1045
+
1046
+ switch (result) {
1047
+ case kUpb_JsonDecodeResult_Ok:
1048
+ break;
1049
+ case kUpb_JsonDecodeResult_OkWithEmptyStringNumerics:
1050
+ rb_warn("%s", upb_Status_ErrorMessage(&status));
1051
+ break;
1052
+ case kUpb_JsonDecodeResult_Error:
1053
+ rb_raise(cParseError, "Error occurred during parsing: %s",
1054
+ upb_Status_ErrorMessage(&status));
1055
+ break;
1046
1056
  }
1047
1057
 
1048
1058
  return msg_rb;
@@ -7,8 +7,6 @@
7
7
 
8
8
  #include "protobuf.h"
9
9
 
10
- #include <ruby/version.h>
11
-
12
10
  #include "defs.h"
13
11
  #include "map.h"
14
12
  #include "message.h"