diff --git a/CHANGES.md b/CHANGES.md index 0b20a0f..2395bdd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,11 @@ +## 0.3.0 (2019-06-24) + +* Add `uncons` primitive (#7, @mattjbray) +* Add `Decoders_sexplib` (#7, @mattjbray) +* Add `Decoders_cbor` (#9, @mattjbray) +* Add `Decoders_bencode` (#14, @c-cube) +* Remove `containers` dependency (#16, @c-cube) + ## 0.2.0 (2019-06-24) * Add `field_opt` decoder (#5, @actionshrimp) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d1d69b5 --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +ISC \ No newline at end of file diff --git a/Makefile b/Makefile index 760878e..14b015b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -ALL_TARGETS=decoders.install decoders-cbor.install decoders-ezjsonm.install decoders-sexplib.install decoders-yojson.install decoders-cbor.install decoders-bencode.install +ALL_TARGETS=decoders.install decoders-bencode.install decoders-cbor.install decoders-ezjsonm.install decoders-sexplib.install decoders-yojson.install .PHONY: build build: diff --git a/README.md b/README.md index db3cf29..b70635c 100644 --- a/README.md +++ b/README.md @@ -281,6 +281,6 @@ After updating CHANGES.md: ``` npm version git push --tags -dune-release -p decoders,decoders-ezjsonm,decoders-yojson +dune-release -p decoders,decoders-bencode,decoders-cbor,decoders-ezjsonm,decoders-sexplib,decoders-yojson npm publish ``` diff --git a/decoders-bencode.opam b/decoders-bencode.opam index e67d763..542523a 100644 --- a/decoders-bencode.opam +++ b/decoders-bencode.opam @@ -2,6 +2,19 @@ opam-version: "2.0" maintainer: "Matt Bray " authors: ["Simon Cruanes"] synopsis: "Bencode interface for decoders" +description: """ +A combinator library for "decoding" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`. + +> Eh? + +An Ocaml program having a JSON (or YAML) data source usually goes something like this: + +1. Get your data from somewhere. Now you have a `string`. +2. *Parse* the `string` as JSON (or YAML). Now you have a `Yojson.Basic.json`, or maybe an `Ezjsonm.value`, or perhaps a `Ocyaml.yaml`. +3. *Decode* the JSON value to an Ocaml type that's actually useful for your program's domain. + +This library helps with step 3. +""" homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/decoders-bencode" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" diff --git a/decoders-cbor.opam b/decoders-cbor.opam index 2f0baf8..eb082f5 100644 --- a/decoders-cbor.opam +++ b/decoders-cbor.opam @@ -2,6 +2,19 @@ opam-version: "2.0" maintainer: "Matt Bray " authors: ["Matt Bray "] synopsis: "CBOR interface for decoders" +description: """ +A combinator library for "decoding" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`. + +> Eh? + +An Ocaml program having a JSON (or YAML) data source usually goes something like this: + +1. Get your data from somewhere. Now you have a `string`. +2. *Parse* the `string` as JSON (or YAML). Now you have a `Yojson.Basic.json`, or maybe an `Ezjsonm.value`, or perhaps a `Ocyaml.yaml`. +3. *Decode* the JSON value to an Ocaml type that's actually useful for your program's domain. + +This library helps with step 3. +""" homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/decoders-cbor" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" diff --git a/decoders-ezjsonm.opam b/decoders-ezjsonm.opam index d14b1c7..c275778 100644 --- a/decoders-ezjsonm.opam +++ b/decoders-ezjsonm.opam @@ -3,6 +3,19 @@ maintainer: "Matt Bray " authors: ["Matt Bray "] homepage: "https://github.com/mattjbray/ocaml-decoders" synopsis: "Interface to ezjsonm for decoders" +description: """ +A combinator library for "decoding" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`. + +> Eh? + +An Ocaml program having a JSON (or YAML) data source usually goes something like this: + +1. Get your data from somewhere. Now you have a `string`. +2. *Parse* the `string` as JSON (or YAML). Now you have a `Yojson.Basic.json`, or maybe an `Ezjsonm.value`, or perhaps a `Ocyaml.yaml`. +3. *Decode* the JSON value to an Ocaml type that's actually useful for your program's domain. + +This library helps with step 3. +""" doc: "https://mattjbray.github.io/ocaml-decoders/decoders-ezjsonm" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" license: "ISC" diff --git a/decoders-ocyaml.opam b/decoders-ocyaml.opam index ea174d4..002547f 100644 --- a/decoders-ocyaml.opam +++ b/decoders-ocyaml.opam @@ -1,6 +1,19 @@ opam-version: "2.0" maintainer: "Matt Bray " synopsis: "YAML interface for ocaml-decoders" +description: """ +A combinator library for "decoding" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`. + +> Eh? + +An Ocaml program having a JSON (or YAML) data source usually goes something like this: + +1. Get your data from somewhere. Now you have a `string`. +2. *Parse* the `string` as JSON (or YAML). Now you have a `Yojson.Basic.json`, or maybe an `Ezjsonm.value`, or perhaps a `Ocyaml.yaml`. +3. *Decode* the JSON value to an Ocaml type that's actually useful for your program's domain. + +This library helps with step 3. +""" authors: ["Matt Bray "] homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/decoders-ocyaml" diff --git a/decoders-sexplib.opam b/decoders-sexplib.opam index 1e8e8f2..1844d33 100644 --- a/decoders-sexplib.opam +++ b/decoders-sexplib.opam @@ -2,6 +2,19 @@ opam-version: "2.0" maintainer: "Matt Bray " authors: ["Matt Bray "] synopsis: "Sexplib interface for decoders" +description: """ +A combinator library for "decoding" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`. + +> Eh? + +An Ocaml program having a JSON (or YAML) data source usually goes something like this: + +1. Get your data from somewhere. Now you have a `string`. +2. *Parse* the `string` as JSON (or YAML). Now you have a `Yojson.Basic.json`, or maybe an `Ezjsonm.value`, or perhaps a `Ocyaml.yaml`. +3. *Decode* the JSON value to an Ocaml type that's actually useful for your program's domain. + +This library helps with step 3. +""" homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/decoders-sexplib" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" diff --git a/decoders-yojson.opam b/decoders-yojson.opam index 69fadd5..a953239 100644 --- a/decoders-yojson.opam +++ b/decoders-yojson.opam @@ -2,6 +2,19 @@ opam-version: "2.0" maintainer: "Matt Bray " authors: ["Matt Bray "] synopsis: "Interface to yojson for decoders" +description: """ +A combinator library for "decoding" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`. + +> Eh? + +An Ocaml program having a JSON (or YAML) data source usually goes something like this: + +1. Get your data from somewhere. Now you have a `string`. +2. *Parse* the `string` as JSON (or YAML). Now you have a `Yojson.Basic.json`, or maybe an `Ezjsonm.value`, or perhaps a `Ocyaml.yaml`. +3. *Decode* the JSON value to an Ocaml type that's actually useful for your program's domain. + +This library helps with step 3. +""" homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/decoders-yojson" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" diff --git a/decoders.opam b/decoders.opam index 93828ff..a99259c 100644 --- a/decoders.opam +++ b/decoders.opam @@ -1,5 +1,18 @@ opam-version: "2.0" synopsis: "Elm-inspired decoders for Ocaml" +description: """ +A combinator library for "decoding" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`. + +> Eh? + +An Ocaml program having a JSON (or YAML) data source usually goes something like this: + +1. Get your data from somewhere. Now you have a `string`. +2. *Parse* the `string` as JSON (or YAML). Now you have a `Yojson.Basic.json`, or maybe an `Ezjsonm.value`, or perhaps a `Ocyaml.yaml`. +3. *Decode* the JSON value to an Ocaml type that's actually useful for your program's domain. + +This library helps with step 3. +""" maintainer: "Matt Bray " authors: ["Matt Bray "] homepage: "https://github.com/mattjbray/ocaml-decoders" diff --git a/package-lock.json b/package-lock.json index 2ec9da6..7051975 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "bs-decoders", - "version": "0.2.0", + "version": "0.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 871fcb9..854f957 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bs-decoders", - "version": "0.2.0", + "version": "0.3.0", "description": "", "main": "index.js", "directories": {