JSON/XML Any encoder or decoder for JSON/XML can be used, providing they implement decode/1 and encode/1. To use jsx, apply the following configuration: {pgmp, [... {codec_json, jsx}, {codec_jsonb, jsx}, ...]}