Skip to content

Commit

Permalink
Merge pull request #22 from cryogenian/master
Browse files Browse the repository at this point in the history
updated to 0.7
  • Loading branch information
jdegoes committed Jul 10, 2015
2 parents f63cd77 + 26af435 commit 7ab9057
Show file tree
Hide file tree
Showing 26 changed files with 1,516 additions and 854 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
bower_components/
node_modules/
output/
dist/
tmp/
npm-debug.log
test/test.js
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ language: node_js
node_js:
- 0.10
env:
- TAG=v0.6.7
- TAG=v0.7.0
install:
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
- sudo tar zxvf $HOME/purescript.tar.gz -C /usr/local/bin purescript/psc{,i,-docs,-make} --strip-components=1
- sudo chmod a+x /usr/local/bin/psc{,i,-docs,-make}
- sudo tar zxvf $HOME/purescript.tar.gz -C /usr/local/bin purescript/psc{,i,-docs,-bundle} --strip-components=1
- sudo chmod a+x /usr/local/bin/psc{,i,-docs,-bundle}
- npm install bower gulp -g
- npm install && bower install
script:
- gulp
- gulp test-make
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,11 @@

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

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

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

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.
- __purescript-argonaut-core__ - basic parsing, printing, folding and types for `JSON`
- __purescript-argonaut-traversals__ - `JCursor`, prisms and traversals for `JSON`
- __purescript-argonaut-codecs__ - `EncodeJson` and `DecodeJson` classes, their instances

## Installation

This can be installed with bower:

```shell
bower i purescript-argonaut
```

## Usage

If you have some data type, and you want to encode it into JSON,
you need to define an instance for Encode.

If you have some JSON, and you want to decode it into some data type,
you need to define an instance for Decode.

[argonaut]: http://argonaut.io/
36 changes: 22 additions & 14 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,29 @@
],
"license": "MIT",
"dependencies": {
"purescript-either": "~0.1.3",
"purescript-maybe": "~0.2.1",
"purescript-tuples": "~0.3.0",
"purescript-maps": "~0.3.0",
"purescript-sets": "~0.3.0",
"purescript-foldable-traversable": "~0.3.0",
"purescript-strings": "~0.4.0",
"purescript-globals": "~0.1.5",
"purescript-control": "~0.2.1",
"purescript-lens": "~0.7.0",
"purescript-optic": "~0.5.0",
"purescript-index": "~0.3.0",
"purescript-integers": "~0.1.0"
"purescript-either": "^0.2.0",
"purescript-tuples": "^0.4.0",
"purescript-maps": "^0.4.0",
"purescript-sets": "^0.4.0",
"purescript-foldable-traversable": "^0.4.0",
"purescript-strings": "^0.5.2",
"purescript-arrays": "^0.4.0",
"purescript-lists": "^0.7.0",
"purescript-prelude": "^0.1.0",
"purescript-globals": "^0.2.0",
"purescript-control": "^0.3.0",
"purescript-lens": "^0.8.0",
"purescript-integers": "^0.2.0",
"purescript-functions": "^0.1.0",
"purescript-optics": "https://github.com/paf31/purescript-optic.git#0.7",
"purescript-index": "https://github.com/paf31/purescript-index.git#0.7",
"purescript-strongcheck": "^0.10.0",
"purescript-unfoldable": "^0.4.0"
},
"devDependencies": {
"purescript-strongcheck": "~0.9.0"
"purescript-console": "^0.1.0"
},
"resolutions": {
"purescript-lens": "^0.8.0"
}
}
3 changes: 3 additions & 0 deletions docs/Data/Argonaut.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Module Data.Argonaut


35 changes: 35 additions & 0 deletions docs/Data/Argonaut/Combinators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Module Data.Argonaut.Combinators

#### `(:=)`

``` purescript
(:=) :: forall a. (EncodeJson a) => String -> a -> JAssoc
```

_non-associative / precedence 7_

#### `(~>)`

``` purescript
(~>) :: forall a. (EncodeJson a) => JAssoc -> a -> Json
```

_right-associative / precedence 6_

#### `(?>>=)`

``` purescript
(?>>=) :: forall a b. Maybe a -> String -> Either String a
```

_left-associative / precedence 1_

#### `(.?)`

``` purescript
(.?) :: forall a. (DecodeJson a) => JObject -> String -> Either String a
```

_non-associative / precedence 7_


Loading

0 comments on commit 7ab9057

Please sign in to comment.