Serializer for GATE/JSON