bivas / protobuf-java-format

Provide serialization and de-serialization of different formats based on Google’s protobuf Message. Enables overriding the default (byte array) output to text based formats such as XML, JSON and HTML.
BSD 3-Clause "New" or "Revised" License
153 stars 97 forks source link

fixed an exception which is thrown in case of facing null instead of an object in json #21

Closed daxzel closed 7 years ago

daxzel commented 8 years ago

Issue #20

{
  "object" : null 
}

Json parser ins't able to parse smth like that.

daxzel commented 8 years ago

Hey, could you commit this pull request as I'm really blocked by this bug and I need a release with this fix

scr commented 8 years ago

Can you please add a unit test for this case? Make sure the test fails before your fix and passes after, of course?

daxzel commented 8 years ago

Yeap. Will do

scr commented 8 years ago

FWIW, I tried to make a unit test, but couldn't reproduce - you'll have to include a .proto (add its processing in pom.xml) to show off the case that fails for you - it could be a case where you've got a required message that is set to null, which actually should be an error (maybe?). Perhaps the appropriate solution in that case, is to include a better error report.

I'm also curious whether, once you get a test that breaks without your change, the jackson version breaks as well…

bivas commented 8 years ago

@scr @daxzel Any updates on this issue?

scr commented 7 years ago

I don't see any updates including unit test that show the issue fixed. Please reopen and add unit test if you still need this.