Convert librray contains encoders and decoders for converting between different data representations, including
UTF-8. Furthermore it provides support for implementing converters in a way which makes them easy to chain and to use with streams.
You use it by first making sure to import it into your project:
Here are the most common type of converters:
json.It is a simple text format for representing structured objects and collections.The JSON encoder/decoder transforms between strings and object structures, such as lists and maps, using the JSON format.
utf8. UTF-8 is a common variable-width encoding that can represent every character in the Unicode character set. The UTF-8 encoder/decoder transforms between Strings and bytes.
In most cases we use the
Converters with streams. This is because they transform the data that comes through the stream as it becomes available.