yesodweb / yesodweb/persistent

Document generation of Aeson instances using mkPersist

Open
#1,091 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
486
Forks
306
PR merge metrics
No merged PRs in 30d

Description

The first place I looked was the persistent-template hackage page. Then I just googled "aeson instance persistent model" and came across a stack overflow answer.

The very simple (but undocumented) solution being:

Person json
    name Text
    age Int

I'd recommend it being on the persistent-template documentation as well as either Database-Persist-Class.PersistEntity or Database-Persist-Class.mkPersist.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the persistent-template Hackage documentation and the Database-Persist-Class.PersistEntity or Database-Persist-Class.mkPersist documentation named in the issue. Add the Person json example showing generated Aeson instances, and verify that the relevant documentation explains this usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.