google-protobuf 4.28.3 → 4.29.0

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: 89810f0fea0c365b6862bc16275aa7da8ef73c5923d82fed89ef9af70cc18850
4
- data.tar.gz: fd9e7a43e25c88e31978b90384f7e5e693d90ffa13a026da771c20ec7faaabfa
3
+ metadata.gz: 84554f042e358709df53e774b914ec550ee2a34ebd4f54655a95cb354328690c
4
+ data.tar.gz: 533fc36a990eccea7ba8d50eee58c92c89ebfdd3c15343a05b0fd15066391712
5
5
  SHA512:
6
- metadata.gz: bc5619f68ea52e4fa1deba15b2b87a016bbdb6ad49089d3e9e3c30b3cd1eb9e67ac1f0cc84a55503d2feb2eec92401fcdd4159b6aa99a4f4acb81c106ba91448
7
- data.tar.gz: ce47defb15aec14aeb2f6117982530e5b0ec53138c0f9805cfe9c83f677e8aba37d7f1e6f787b411f396928f2b8053d8567ee48281611c481a7d128ea711dd16
6
+ metadata.gz: dd855f18f3a68cfa35f4482f8492ba089e579589e09056d22e4d577dc3ebbcef8ede9e61eafc2ba6fdfa2eb344ed6daa1e7ff95b05b3349fd87d375638c982c1
7
+ data.tar.gz: 984bce8c9d6e74aa1302143ef8fcb5a28331f6a4531bc8c0659019ccec7e876a6b9f8f2b871338cb2b6391cf0a34a7748096c27e95afabdbc9bb1a30e63bcff5
@@ -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"