haskell / haskell/aeson

Add saner ByteString instances

Open
#187 22 comments 3 reactions 0 assignees View on GitHub
blocked by upstream/should be done externally help wanted needs decision
Dominant language
Haskell
Stars
1.3k
Forks
336
Avg merge
3d 7h
Merged PRs (30d)
4

Description

ByteString instances were removed because they allowed people to try and insert arbitrary binary data that JSON can't handle.

Could we not re-add ByteString instances that leveraged something like base64 encoding (which JSON can take I believe) to work around this limitation?

```
Fuuzetsu: Best thing to do is to avoid putting bytestrings in json,
but when it's unavoidable:
https://gist.github.com/mgsloan/bfe4bf2250c1d656a2b1 [05:03]
```

Contributor guide

Open the contributing guide

Research direction

Start with the linked gist and inspect aeson's current handling of ByteString and JSON encoding. Clarify the intended base64 representation and the compatibility expectations in the discussion before identifying the implementation and test locations. Done should include an agreed approach and verified ByteString JSON behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.