FasterXML / jackson-dataformats-binary

Uber-project for standard Jackson binary format backends: avro, cbor, ion, protobuf, smile
Apache License 2.0
316 stars 136 forks source link

streamReadConstaints support in Ion dataformat #358

Open pjfanning opened 1 year ago

pjfanning commented 1 year ago
cowtowncoder commented 1 year ago

Right, Ion codec used under the hood is from Amazon's library, and that would need to co-operate here.

Ion maintainers may be able to help here: until then, maybe we should add test under .../failing and leave this issue open? Altough I technically wrote version 0.5-alpha of this format backend, as a proof-of-concept (... and it was eventually contributed to Jackson project couple of years after I had left Amazon :-D ), I am not familiar enough with it at this point to be able to make changes. And possibly unable to if support at library level was needed (I wasn't involved with actual Ion codec development).

pjfanning commented 1 year ago

@cowtowncoder is there someone in Amazon Ion team that could be approached?

It is probably safe to say that none of the StreamReadConstraints stuff works for this format right now (including the num size limits) - or IonReader could have something of its own.

cowtowncoder commented 1 year ago

Right, for now Ion doesn't get constraints, beyond what Amzn codec might offer out of the box.

Yes, there are some maintainers

I should probably figure if one of them is considered active (or perhaps someone else, I recall seeing other accounts too) and then update documentation.

tgregg commented 1 year ago

I've opened the above-linked feature request within the ion-java repository. This functionality isn't currently provided, but the use case is pretty easy to understand, so we (the Ion maintainers) should consider it.

cowtowncoder commented 1 year ago

That's good, and I think there could be two ways to configure limits: native Ion (when providing low-level components to Jackson factory), or, if limit-options match, using StreamReadConstraints to configure Ion side.

pjfanning commented 1 year ago

In jackson 2.16 (when released), there will also be a limit on the size of the object names. 50,000 chars or bytes depending on the input context.