| 24 | import feign.codec.JsonEncoder; |
| 25 | |
| 26 | @Experimental |
| 27 | public class Fastjson2Codec implements Codec, JsonCodec { |
| 28 | |
| 29 | private final Fastjson2Encoder encoder; |
| 30 | private final Fastjson2Decoder decoder; |
| 31 | |
| 32 | public Fastjson2Codec() { |
| 33 | this.encoder = new Fastjson2Encoder(); |
| 34 | this.decoder = new Fastjson2Decoder(); |
| 35 | } |
| 36 | |
| 37 | public Fastjson2Codec(JSONWriter.Feature[] writerFeatures, JSONReader.Feature[] readerFeatures) { |
| 38 | this.encoder = new Fastjson2Encoder(writerFeatures); |
| 39 | this.decoder = new Fastjson2Decoder(readerFeatures); |
| 40 | } |
| 41 | |
| 42 | @Override |
| 43 | public JsonEncoder encoder() { |
| 44 | return encoder; |
| 45 | } |
| 46 | |
| 47 | @Override |
| 48 | public JsonDecoder decoder() { |
| 49 | return decoder; |
| 50 | } |
| 51 | } |
nothing calls this directly
no outgoing calls
no test coverage detected