Serializes data into an Avro binary format
serializeAvro(data, writerSchema [, queryFormat, useCustomSerialization])
→ returns any
row
column
struct
true
Serializes a ColdFusion query into an array of Avro binary data
news = queryNew("id,title",
"integer,varchar",
[ {"id":1,"title":"Dewey defeats Truman"}, {"id":2,"title":"Man walks on Moon"} ]);
newsSchema = '{
"namespace": "my.example",
"type": "record",
"name": "News",
"fields": [ {"name":"id","type":"int"}, {"name":"title","type":"string"} ]
}';
writeDump(serializeAvro(data, newsSchema));
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.