Closed zhangOranges closed 3 months ago
I am ok with targeted removal of final
(with all the caveats that sub-classing of this type is strongly discouraged as these methods are not part of API in the sense that no backwards-compatibility is implied across minor versions) for methods. But static fields should remain final, they are not meant to be changed.
Aside from requested change wrt static fields, one thing I'd need before merging is CLA (unless already received one), from:
https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf
The usual way is to print it, fill & sign, scan/photo, email to cla
at fasterxml dot com.
This is needed once before the first contribution; after that good for all future PRs.
Okay, I want to add some of my own logical operations before writing to outBuffer, but I couldn't find the provided entry, so I saw the WriterBasedJsonGenerator class. However, some of the protected methods were declared final, which confused me. Is there any other better way for me to operate, similar to an AOP
@zhangOranges One thing that might work JsonGeneratorDelegate
:
src/main/java/com/fasterxml/jackson/core/util/JsonGeneratorDelegate.java
which could intercept calls. It depends on kinds of changes you need to make. You basically use it to "wrap" a real generator, and by default it just delegates all calls; but you can override whatever public methods you want. Since it operates on public API it is more limited, but also much safer and easier to maintain approach.
JsonGeneratorDelegate
{ //test "demo":"1" } Annotation test is what I want to add, JsonGeneratorDelegate may not meet my needs, right?
@zhangOranges One thing that might work
JsonGeneratorDelegate
:src/main/java/com/fasterxml/jackson/core/util/JsonGeneratorDelegate.java
which could intercept calls. It depends on kinds of changes you need to make. You basically use it to "wrap" a real generator, and by default it just delegates all calls; but you can override whatever public methods you want. Since it operates on public API it is more limited, but also much safer and easier to maintain approach.
I want to add some other things before writing the correct JSON key value
Aside from requested change wrt static fields, one thing I'd need before merging is CLA (unless already received one), from:
https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf
The usual way is to print it, fill & sign, scan/photo, email to
cla
at fasterxml dot com. This is needed once before the first contribution; after that good for all future PRs.
Is there any other simple signature method? I currently don't have a printer
@zhangOranges One thing that might work
JsonGeneratorDelegate
:src/main/java/com/fasterxml/jackson/core/util/JsonGeneratorDelegate.java
which could intercept calls. It depends on kinds of changes you need to make. You basically use it to "wrap" a real generator, and by default it just delegates all calls; but you can override whatever public methods you want. Since it operates on public API it is more limited, but also much safer and easier to maintain approach.
I want to add some other things before writing the correct JSON key value
It would be possible to override writeFieldName()
, call writeRaw()
on delegate before forwarding writeFieldName()
.
Aside from requested change wrt static fields, one thing I'd need before merging is CLA (unless already received one), from: https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf The usual way is to print it, fill & sign, scan/photo, email to
cla
at fasterxml dot com. This is needed once before the first contribution; after that good for all future PRs.Is there any other simple signature method? I currently don't have a printer
What some contributors have done is to use an app that takes PDF, allows adding text to fill in the fields (add text in approximate location). That works for me.
Aside from requested change wrt static fields, one thing I'd need before merging is CLA (unless already received one), from: https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf The usual way is to print it, fill & sign, scan/photo, email to
cla
at fasterxml dot com. This is needed once before the first contribution; after that good for all future PRs.Is there any other simple signature method? I currently don't have a printer
What some contributors have done is to use an app that takes PDF, allows adding text to fill in the fields (add text in approximate location). That works for me.
Which email to send after signing
@zhangOranges One thing that might work
JsonGeneratorDelegate
:src/main/java/com/fasterxml/jackson/core/util/JsonGeneratorDelegate.java
which could intercept calls. It depends on kinds of changes you need to make. You basically use it to "wrap" a real generator, and by default it just delegates all calls; but you can override whatever public methods you want. Since it operates on public API it is more limited, but also much safer and easier to maintain approach.
I want to add some other things before writing the correct JSON key value
It would be possible to override
writeFieldName()
, callwriteRaw()
on delegate before forwardingwriteFieldName()
.
WriteFieldName will add a comma to the end of the previous execution, so this method is not feasible
Aside from requested change wrt static fields, one thing I'd need before merging is CLA (unless already received one), from: https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf The usual way is to print it, fill & sign, scan/photo, email to
cla
at fasterxml dot com. This is needed once before the first contribution; after that good for all future PRs.Is there any other simple signature method? I currently don't have a printer
What some contributors have done is to use an app that takes PDF, allows adding text to fill in the fields (add text in approximate location). That works for me.
Which email to send after signing
I mentioned this earlier; "cla@fasterxml.com"
Aside from requested change wrt static fields, one thing I'd need before merging is CLA (unless already received one), from: https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf The usual way is to print it, fill & sign, scan/photo, email to
cla
at fasterxml dot com. This is needed once before the first contribution; after that good for all future PRs.Is there any other simple signature method? I currently don't have a printer
What some contributors have done is to use an app that takes PDF, allows adding text to fill in the fields (add text in approximate location). That works for me.
Which email to send after signing
I mentioned this earlier; "cla@fasterxml.com"
ok
Aside from requested change wrt static fields, one thing I'd need before merging is CLA (unless already received one), from: https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf The usual way is to print it, fill & sign, scan/photo, email to
cla
at fasterxml dot com. This is needed once before the first contribution; after that good for all future PRs.Is there any other simple signature method? I currently don't have a printer
What some contributors have done is to use an app that takes PDF, allows adding text to fill in the fields (add text in approximate location). That works for me.
Which email to send after signing
I mentioned this earlier; "cla@fasterxml.com"
has been sent
Ok received the first CLA and while it's almost good asked for minor edit (so there's name and github id both).
Ok received the first CLA and while it's almost good asked for minor edit (so there's name and github id both).
has been sent
CLA received.
The protected method removes the final to allow users to rewrite the method and implement their own logic