hjsonpointer: JSON Pointer library

[ data, library, mit ] [ Propose Tags ]

[Skip to Readme]
Versions 0.1.0.0, 0.1.0.1, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.0.4, 0.3.0.0, 0.3.0.1, 0.3.0.2, 1.0.0.0, 1.0.0.1, 1.0.0.2, 1.1.0.0, 1.1.0.1, 1.1.0.2, 1.1.1, 1.2.0, 1.3.0
Change log changelog.txt
Dependencies aeson (>=0.7 && <0.10), base (>=4.6 && <4.9), text (==1.2.*), unordered-containers (==0.2.*), vector (>=0.10 && <0.12) [details]
License MIT
Author Ian Grant Jeffries
Maintainer ian@housejeffries.com
Category Data
Home page https://github.com/seagreen/hjsonpointer
Source repo head: git clone git://github.com/seagreen/hjsonpointer.git
Uploaded by seagreen at Sat Sep 12 21:13:00 UTC 2015
Distributions Arch:1.3.0, LTSHaskell:1.3.0, NixOS:1.3.0, openSUSE:1.3.0
Downloads 5171 total (50 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-09-29 [all 2 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for hjsonpointer-0.2.0.4

[back to package description]

Summary

JSON Pointer library for Haskell.

Example

{-# LANGUAGE OverloadedStrings #-}

module Main where

import           Data.Aeson
import qualified Data.HashMap.Strict as H
import           Data.JsonPointer

main :: IO ()
main =
  case jsonPointer "/foo" of
    Left e     -> print e
    Right pntr ->
      case resolvePointer pntr (Object $ H.singleton "foo" $ String "bar") of
        Left e2 -> print e2
        Right v -> print v

Output:

String "bar"