Skip to content

Commit

Permalink
Merge pull request codahale#17 from leifwickland/development
Browse files Browse the repository at this point in the history
Added notes to README.md to help others avoid my pitfalls with case classes.
  • Loading branch information
Coda Hale committed Jun 8, 2011
2 parents ab25b26 + ef04587 commit 3d5c911
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ parse[List[Int]]("[1,2,3]") //=> List(1,2,3)
parse[Map[String, Int]]("""{"one":1,"two":2}""") //=> Map("one"->1,"two"->2)

// Parse JSON objects as case classes
// (Nested/inner case classes aren't supported.)
// (Parsing case classes isn't supported in the REPL.)
case class Person(id: Long, name: String)
parse[Person]("""{"id":1,"name":"Coda"}""") //=> Person(1,"Coda")

Expand Down

0 comments on commit 3d5c911

Please sign in to comment.