Skip to content

Commit 7ab9057

Browse files
committed
Merge pull request #22 from cryogenian/master
updated to 0.7
2 parents f63cd77 + 26af435 commit 7ab9057

26 files changed

+1516
-854
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
bower_components/
55
node_modules/
66
output/
7+
dist/
78
tmp/
89
npm-debug.log
910
test/test.js

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ language: node_js
22
node_js:
33
- 0.10
44
env:
5-
- TAG=v0.6.7
5+
- TAG=v0.7.0
66
install:
77
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
8-
- sudo tar zxvf $HOME/purescript.tar.gz -C /usr/local/bin purescript/psc{,i,-docs,-make} --strip-components=1
9-
- sudo chmod a+x /usr/local/bin/psc{,i,-docs,-make}
8+
- sudo tar zxvf $HOME/purescript.tar.gz -C /usr/local/bin purescript/psc{,i,-docs,-bundle} --strip-components=1
9+
- sudo chmod a+x /usr/local/bin/psc{,i,-docs,-bundle}
1010
- npm install bower gulp -g
1111
- npm install && bower install
1212
script:
13-
- gulp
13+
- gulp test-make

README.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,11 @@
22

33
[![Build Status](https://travis-ci.org/purescript-contrib/purescript-argonaut.svg)](https://travis-ci.org/purescript-contrib/purescript-argonaut)
44

5-
This is an implementation of [Argonaut][argonaut] for the PureScript language.
5+
## Deprecated
66

7-
While not as feature rich as the Scala version, it still supports encoding and decoding.
7+
This library have been splitted to
88

9-
A recent change is using native Javascript data types and functionality for parsing and rendering. If you don't use lenses, performance should be extremely good.
9+
- __purescript-argonaut-core__ - basic parsing, printing, folding and types for `JSON`
10+
- __purescript-argonaut-traversals__ - `JCursor`, prisms and traversals for `JSON`
11+
- __purescript-argonaut-codecs__ - `EncodeJson` and `DecodeJson` classes, their instances
1012

11-
## Installation
12-
13-
This can be installed with bower:
14-
15-
```shell
16-
bower i purescript-argonaut
17-
```
18-
19-
## Usage
20-
21-
If you have some data type, and you want to encode it into JSON,
22-
you need to define an instance for Encode.
23-
24-
If you have some JSON, and you want to decode it into some data type,
25-
you need to define an instance for Decode.
26-
27-
[argonaut]: http://argonaut.io/

bower.json

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,29 @@
77
],
88
"license": "MIT",
99
"dependencies": {
10-
"purescript-either": "~0.1.3",
11-
"purescript-maybe": "~0.2.1",
12-
"purescript-tuples": "~0.3.0",
13-
"purescript-maps": "~0.3.0",
14-
"purescript-sets": "~0.3.0",
15-
"purescript-foldable-traversable": "~0.3.0",
16-
"purescript-strings": "~0.4.0",
17-
"purescript-globals": "~0.1.5",
18-
"purescript-control": "~0.2.1",
19-
"purescript-lens": "~0.7.0",
20-
"purescript-optic": "~0.5.0",
21-
"purescript-index": "~0.3.0",
22-
"purescript-integers": "~0.1.0"
10+
"purescript-either": "^0.2.0",
11+
"purescript-tuples": "^0.4.0",
12+
"purescript-maps": "^0.4.0",
13+
"purescript-sets": "^0.4.0",
14+
"purescript-foldable-traversable": "^0.4.0",
15+
"purescript-strings": "^0.5.2",
16+
"purescript-arrays": "^0.4.0",
17+
"purescript-lists": "^0.7.0",
18+
"purescript-prelude": "^0.1.0",
19+
"purescript-globals": "^0.2.0",
20+
"purescript-control": "^0.3.0",
21+
"purescript-lens": "^0.8.0",
22+
"purescript-integers": "^0.2.0",
23+
"purescript-functions": "^0.1.0",
24+
"purescript-optics": "https://github.com/paf31/purescript-optic.git#0.7",
25+
"purescript-index": "https://github.com/paf31/purescript-index.git#0.7",
26+
"purescript-strongcheck": "^0.10.0",
27+
"purescript-unfoldable": "^0.4.0"
2328
},
2429
"devDependencies": {
25-
"purescript-strongcheck": "~0.9.0"
30+
"purescript-console": "^0.1.0"
31+
},
32+
"resolutions": {
33+
"purescript-lens": "^0.8.0"
2634
}
2735
}

docs/Data/Argonaut.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Module Data.Argonaut
2+
3+

docs/Data/Argonaut/Combinators.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Module Data.Argonaut.Combinators
2+
3+
#### `(:=)`
4+
5+
``` purescript
6+
(:=) :: forall a. (EncodeJson a) => String -> a -> JAssoc
7+
```
8+
9+
_non-associative / precedence 7_
10+
11+
#### `(~>)`
12+
13+
``` purescript
14+
(~>) :: forall a. (EncodeJson a) => JAssoc -> a -> Json
15+
```
16+
17+
_right-associative / precedence 6_
18+
19+
#### `(?>>=)`
20+
21+
``` purescript
22+
(?>>=) :: forall a b. Maybe a -> String -> Either String a
23+
```
24+
25+
_left-associative / precedence 1_
26+
27+
#### `(.?)`
28+
29+
``` purescript
30+
(.?) :: forall a. (DecodeJson a) => JObject -> String -> Either String a
31+
```
32+
33+
_non-associative / precedence 7_
34+
35+

0 commit comments

Comments
 (0)