json-directory: Load JSON from files in a directory structure

[ bsd3, codec, library, program ] [ Propose Tags ]

Load JSON from files in a directory structure. The object created mirrors the directory structure, using filenames as keys. Useful for breaking apart large JSON structures.


[Skip to Readme]
Versions [faq] 0.1.0.0
Change log CHANGELOG.md
Dependencies aeson, base (>=4.12.0.0 && <4.13), bytestring, directory, filepath, json-directory, text, unordered-containers [details]
License BSD-3-Clause
Copyright (c) 2019 Luke Clifton
Author Luke Clifton
Maintainer lukec@themk.net
Category Codec
Bug tracker https://github.com/luke-clifton/json-directory/issues
Source repo head: git clone https://github.com/luke-clifton/json-directory
Uploaded by lukec at Wed Dec 18 11:55:59 UTC 2019
Distributions NixOS:0.1.0.0
Executables jsondir
Downloads 76 total (37 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-12-18 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for json-directory-0.1.0.0

[back to package description]

Provides utilities for reading JSON structures out of directories. Directory entries become keys in a map, and the values are sourced from the contets of each entry.

  • Directories are recured into
  • Files ending with .json are read as JSON values
  • Everything else is interpreted as a string

The example directory in this repository would result in the following JSON value.

{
  "empty": {},
  "a": "This is files will have its contents written into a JSON string.\n",
  "d": {
    "example": "Sometimes it's convenient to embed some raw JSON"
  },
  "b": 42,
  "c": {
    "nested": "You can nest directories to create a tree structure.\n"
  }
}