From 5a02193a8de9084d458ae8ea9d3d670c96a41e84 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 13 Feb 2013 05:30:22 +0530 Subject: [PATCH] readme corrections --- README.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4dae5d2..0edd077 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,12 @@ (require '[avroclj.avro :as avro])) -;The avro schema to use for serializing/desrializing should be attached to the clojure map using the meta key :avro-type -;in the below example, avroclj will look for "avroclj/model/person/Person.avsc" in the class path +;The avro schema to use for serializing/desrializing should be attached to the +;clojure map using the meta key :avro-type + +;in the below example, avroclj will look for the avro schema file : "avroclj/model/person/Person.avsc" in the class path +;to serialize/deserialize + (defn person [fields] (with-meta fields {:avro-type :avroclj-model-person-Person}) ) @@ -23,6 +27,22 @@ ``` +##avroclj/model/person/Person.avsc + +```json +{ + "namespace": "avroclj.model.person", + "type" : "record", + "name" : "Person", + "doc" : "Represents a Person", + "fields" : [ + {"name" : "firstName", "type" : "string"}, + {"name" : "middleName", "type" : "string"}, + {"name" : "lastName", "type" : "string"} + ] +} +``` + ## Installation