Make JsonPointer java.io.Serializable#762
Conversation
Noting that `Instances [of JsonPointer] are fully immutable and can be cached, shared between threads` it would be nice to be able to pass these between workers that require object serialization to pass instances around.
|
Seems reasonable, I like the idea. However, I wonder if this could be optimized to actually serialize as String, re-parse? (implement Externalizable) |
|
@cowtowncoder good call. I ran into an issue where class properties that need to be set via readExternal cannot be declared final. I made 2 commits, each with a different approach to maintaining the |
|
Ok thank you. One thing I also need to consider is that I hope implement fix for #736 which will probably change internal layout of things anyway. |
| * implementing {@link Externalizable}. | ||
| */ | ||
| protected JsonPointer() { | ||
| public JsonPointer() { |
There was a problem hiding this comment.
Does Externalizable really require that? TIL
|
|
Ok, this looks good. One last thing, CLA: unless you have already sent one, we'd need this: https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf (the usual way is to print, fill & sign, scan/photo, email to If you have already sent one already let me know (sometimes I forget as there are quite a few). Once there's CLA I'll merge this. CLA works for any and all future contributions too so it's just a one-time hassle. Looking forward to merging this PR! |
|
Signed and sent 🙂 |
JsonPointer java.io.Serializable
|
Merged to be included in 2.14.0. Thank you very much for contributing this, @egalpin ! |
|
Thanks @cowtowncoder for the prompt and welcoming review! 🙏 |
Noting that
Instances [of JsonPointer] are fully immutable and can be cached, shared between threadsit would be nice to be able to pass these between workers that require object serialization to pass instances around.