summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Rudolph <johannes.rudolph@gmail.com>2018-08-02 10:14:40 +0200
committerGitHub <noreply@github.com>2018-08-02 10:14:40 +0200
commit7b0d5d802838aa5e0676cf587344287ed247b387 (patch)
tree7de73a60eeb8798a1d715b04af4620f2eb949988
parent245a3fbeb96c6e6df711daf9989350d2d7f9ab81 (diff)
parent95a4fa7f9fd6466010a99fdc2902410944e047e8 (diff)
downloadspray-json-7b0d5d802838aa5e0676cf587344287ed247b387.tar.gz
spray-json-7b0d5d802838aa5e0676cf587344287ed247b387.tar.bz2
spray-json-7b0d5d802838aa5e0676cf587344287ed247b387.zip
Merge pull request #272 from nikhilpatil/patch-1
Update README.markdown
-rw-r--r--README.markdown8
1 files changed, 4 insertions, 4 deletions
diff --git a/README.markdown b/README.markdown
index adb6561..458627e 100644
--- a/README.markdown
+++ b/README.markdown
@@ -41,26 +41,26 @@ import DefaultJsonProtocol._ // if you don't supply your own Protocol (see below
and do one or more of the following:
-* Parse a JSON string into its Abstract Syntax Tree (AST) representation
+1. Parse a JSON string into its Abstract Syntax Tree (AST) representation
```scala
val source = """{ "some": "JSON source" }"""
val jsonAst = source.parseJson // or JsonParser(source)
```
-* Print a JSON AST back to a String using either the `CompactPrinter` or the `PrettyPrinter`
+2. Print a JSON AST back to a String using either the `CompactPrinter` or the `PrettyPrinter`
```scala
val json = jsonAst.prettyPrint // or .compactPrint
```
-* Convert any Scala object to a JSON AST using the `toJson` extension method
+3. Convert any Scala object to a JSON AST using the `toJson` extension method
```scala
val jsonAst = List(1, 2, 3).toJson
```
-* Convert a JSON AST to a Scala object with the `convertTo` method
+4. Convert a JSON AST to a Scala object with the `convertTo` method
```scala
val myObject = jsonAst.convertTo[MyObjectType]