Default Implementations – PakDefaultDatatransformer
PAKs default data transformation is implemented in de.asap.pak.extra.impl.datatransformer.PakDefaultDataTransformer
. In order to let PAK use this implementation, simply declare a dependency on de.asap.pak.extra:pak-default-datatransformer
.
The default scheme defined by the implementation, basically resembles the JSON definition. Additionally, we want to follow the user gets what they type ideology. This means JSON specific characters like quotes „ or line breaks are handled within the data transformer. Following from that, our scheme defines no „real“ JSON strings. For any JSON conversions within the transformer, the default implementation of the IJsonMapper is used.
Scheme | JSON Output |
---|---|
Hello World |
„Hello World“ |
„Hello World“ |
„\“Hello World\““ |
{„id“:1, „ls“:[„a“,“b“,“c“])} |
{„id“:1, „ls“:[„a“,“b“,“c“])} |
„{„id“:1, „ls“:[„a“,“b“,“c“])}“ |
„\“{\“id\“:1,\“ls\“:[\“a\“,\“b\“,\“c\“])}\““ |
{„test“: „Hello |
„{\“test\“: \“Hello\nWorld\“}“ |
{„test“: „Hello\nWorld“} |
{„test“: „Hello\nWorld“} |