Skip to content

This module adds support for encoding and decoding JSON via Fastjson.

License

Notifications You must be signed in to change notification settings

bluecreator/feign-fastjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fastjson Codec

This module adds support for encoding and decoding JSON via Fastjson.

Add FastjsonEncoder and/or FastjsonDecoder to your Feign.Builder like so:

GitHub github = Feign.builder()
                     .encoder(new FastjsonEncoder())
                     .decoder(new FastjsonDecoder())
                     .target(GitHub.class, "https://api.github.com");

If you want to customize the ParserConfig and SerializeConfig that are used, provide it to the FastjsonEncoder and FastjsonDecoder:

ParserConfig parserConfig = new ParserConfig();
//Custom the parserConfig...
SerializeConfig serializeConfig = new SerializeConfig();
//Custom the serializeConfig...

GitHub github = Feign.builder()
                     .encoder(new FastjsonEncoder(serializeConfig))
                     .decoder(new FastjsonDecoder(parserConfig))
                     .target(GitHub.class, "https://api.github.com");

About

This module adds support for encoding and decoding JSON via Fastjson.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages