Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
skuzzle committed Mar 20, 2019
1 parent 1031793 commit 2ddb66f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ Versions can be written to/read from streams by Java's `ObjectOutputStream` and

```java
new ObjectOutputStream(yourOutStream).writeObject(Version.parseVersion("1.2.3"));
Version version = (Version) new ObjectInputStream`(yourInStream).readObject();
Version version = (Version) new ObjectInputStream(yourInStream).readObject();
```

Serializing Versions from and to json is also possible but requires third party libraries
like `jackson` or `gson`. Support for those is not built in (in order to not ship extra
dependencies) but examples can be found within the unit tests
[here (jackson)](https://github.com/skuzzle/semantic-version/blob/master/src/test/java/de/skuzzle/semantic/CustomJacksonSerialization.java)
and [here (gson)](https://github.com/skuzzle/semantic-version/blob/master/src/test/java/de/skuzzle/semantic/CustomGsonSerialization.java). Both examples will serialize the Version as its String representation as
opposed to destructing it into its single fields.
opposed to destructing it into its single fields.

0 comments on commit 2ddb66f

Please sign in to comment.