Skip to content

Serialization

Alan Zimmer edited this page Oct 22, 2020 · 6 revisions

Introduction

Azure Core offers the ObjectSerializer and JsonSerializer interfaces as a standard way to handle serialization and deserialization of specific serialization formats. There are no implementations of these interfaces built into Azure Core, instead a service provider interface (SPI) is used to retrieve available implementations from the classpath. The SPI allows for the serialization layer to be plug-able and removes dependencies on given implementations.

In addition to the interfaces Azure Core has an internal serialization layer that is configured to handle service request and response objects generated by our code generators. The ObjectSerializer and JsonSerializer apply their functionality to class types from outside of the class types generated for service request and responses.

Implementations

Replacing the serializer

Configuring serializer

Example

Netty

OkHttp

Writing a custom serializer plugin

Clone this wiki locally