On Wed, Nov 11, 2015 at 5:02 PM, Feng Xiao <[email protected]> wrote:
> > > On Thu, Nov 12, 2015 at 12:53 AM, Abhishek Parmar <[email protected]> > wrote: > >> On Wed, Nov 11, 2015 at 4:46 PM, Feng Xiao <[email protected]> wrote: >> >>> >>> >>> On Tue, Nov 10, 2015 at 7:04 PM, Abhishek Parmar <[email protected]> >>> wrote: >>> >>>> I am using v3.0.0-beta-1 >>>> >>>> Based on a quick read of the code I thought >>>> google/protobuf/util/internal/protostream_objectwriter.cc >>>> was not doing error checks in method >>>> ProtoStreamObjectWriter::AnyWriter::RenderDataPiece >>>> >>>> There was a TODO to make attention to status which seem to have been >>>> fixed in v3.0.0-beta-1-bzl-fix. I tried that and it seems no better. >>>> >>>> So perhaps there is something else that I am missing. FWIW my code is >>>> closely modeled after json_util_test.cc >>>> >>>> Any help will be greatly appreciated. >>>> >>> By mistyped fields do you mean the Any type url is incorrect? The JSON >>> conversion code should report an error for that. If it's not, could you >>> file an issue on our github site? >>> >> >> I mean that if a fields for example is of type int32 and the json >> contains a string, it silently drops the field. I amanaged to debug a bit >> more and seems like this is by design as the STRING type DataPiece gets >> safely converted to a number? >> >> But I saw similar behavior for even nested messages. The parser just >> silently drops fields that do not match the type in the protobuffer. If >> this is intentional, then perhaps we should have a strict mode. Let me >> know what you think. >> > Yeah, the parser is currently more lenient then it should be. That's a > known issue and we are working on fixing them. The final release of v3.0.0 > will include a set of conformance tests to ensure all JSON implementations > are conforming to the same spec and the cases you mentioned here will all > be covered by that (and for these cases the parser should return an parsing > error rather than dropping the fields). > Thanks , thats good to know. Any ides of the timeframe for this release? And is there any way I can help push this forward? > > >> >> >>> >>> >>>> >>>> Thanks >>>> Abhishek >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Protocol Buffers" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at http://groups.google.com/group/protobuf. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >> >> >> -- >> -Abhishek >> >> > -- -Abhishek -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
