google-protobuf 4.28.2-java → 4.29.0-java

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: 3dbf9863d92e477ead930875eaa6ee968b26b8094cdc681aa99955d663e20ed4
4
- data.tar.gz: 587779bb3c8de4da7d877fe44d65c8a41424a06013afb2ad0d7bd647eefd9e88
3
+ metadata.gz: b0c8ebce1da49dae91c53b012caa5b71e0ed8c1ab7978c85c60a3982b29fff20
4
+ data.tar.gz: 5f8984e107c7cc2141065087c9d05856244a0b8e757a9ba791a8899a027c3bf8
5
5
  SHA512:
6
- metadata.gz: ea76854ba7fbdf585722dc7d3f360985e52da0a63b7c3fce5a854e592add5016be52ec1d889df1acd2860b613b21dff8c857e28bb480e6fd184b5c9689e984d4
7
- data.tar.gz: c790c5a6a9e588fab1da6767d8e21a406ed267b2dcb3a72a33452309927636cd89351cdcfed3ac11100d4b24e05b73bf2bce4e9a22f5e80aeb9b75c7b1e099ce
6
+ metadata.gz: accf1aab2a495df0810dd48edd511a41988d4e65aeb9e3723d33edcfb772a10af9f5a252558c173bc067f5a9486f198207a6d9613c766dc2fa6d980749adab0e
7
+ data.tar.gz: d7cf853b7a7e96bc614536c656d7c67cf0225bcc9e110d964879f0f3e4d2e4aefeb3f2cd246226581205cb3b9f7deb76b981444835703fea81ee447baab47296
@@ -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"