Skip to content

Commit

Permalink
readme corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
yehohanan7 committed Feb 13, 2013
1 parent 3a495aa commit 5a02193
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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})
)
Expand All @@ -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


Expand Down

0 comments on commit 5a02193

Please sign in to comment.