Skip to content

Port Elm's Json.Decode #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# json-extra
Facilitating JSON encoding and decoding by copying Elm's equivalent package

Facilitating JSON encoding and decoding by copying Elm's equivalent package.

This package aims to port
[Json.Decode](https://package.elm-lang.org/packages/elm/json/latest/Json.Decode)
and
[Json.Encode](https://package.elm-lang.org/packages/elm/json/latest/Json-Encode)
to N.
10 changes: 10 additions & 0 deletions decode/error.n
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import json

/// A decoding error type that describes precisely how an error happened. This
/// can be used to make more elaborate visualizations of a decoding error. For
/// example, you could show a preview of the JSON object and highlight the
/// invalid parts in red.
type pub error = pub <field str error>
| pub <index int error>
| pub <oneOf list[error]>
| pub <failure str json.value>
Loading