JSON Against Humanity
Finally, Cards Against Humanity® as plain text and JSON. Enjoy fresh on GitHub.
FAQ
How many cards are there?
Let me think about it for a second...
Wha— where the heck did you find all those cards??
The primary source is this Google Sheet I found through Board Game Geek. Previous sources included Hangouts Against Humanity, Pretend You're Xyzzy, and contributions from viewers like you.
What font is CAH?
Cards Against Humanity® cards are printed in Helvetica® Neue. It's not free. I use Inter Medium. You're looking at it now.
Who are you?
I'm just getting started and I have a lot of questions
You can reach me by opening an Issue on GitHub or by email at chris.hallberg@hey.com. I'd love to hear from you!
I have the best feature idea! Can you add this?
Sure! Open a pull request.
I want to give you money.
That's very nice of you but you legally can't. Donate to erase medical debt or support local community bail funds instead.
File formats
Plaintext
White, answer cards.
Putting a new card on each line.
Aping a divider after the white cards.
----------
I love it when my {1} are in plaintext.
How are these cards styled?
Markdown emphasis is *one* thing, but {1] AND {2}?? *Now* you're talking!
full.json
An array of packs with all the included white black cards inside. Each card has an id, in case it gets lost. Some cards may be duplicated if they are in different packs.
[
{
"pack": 0,
"name": "The Base Set",
"description": "Sweet dirty vanilla",
"official": true,
"white": [
{
"text": "Answer cards in plain text, formatted with **Markdown**",
"pack": 0
},
...
],
"black": [
{
"text": "Prompt cards, now with {1} for blanks!",
"pick": 1,
"pack": 0
},
...
],
},
{ "pack": 1, "name": ..., "white": [], ... },
{ "pack": 2, "name": ..., "white": [], ... },
...
]
compact.json
An array of all white cards, all black cards, then all packs, with included cards listed as indexes. I wrote a small library to take advantage of this concise format: CAHDeck.js.
{
"white": [
"Answer cards in plain text, formatted with **Markdown**",
"One * for *italics* or emphasis."
],
"black": [
{ "text": "Prompt cards\nformatted with {1}.", "pick": 1 },
{ "text": "I want a {1} **and** {2} sandwich! No corners!", "pick": 2 }
],
"packs": {
"abbreviation": {
"name": "The Base Set",
"description": "Sweet dirty vanilla",
"official": true,
"white": [0, 1, 2, ... , n],
"black": [0, 1, 2, ... , n]
}
}
}
Examples
Canvas Deck Sampler
Demonstration of ingesting the cah-all-compact.json file with the basic Javascript library and displaying cards on a canvas element.
This Very Webpage
Ingesting from compact.json, listing decks, combining selected decks, and exporting files.
Fine Print
Is this legal?
Yes. Cards Against Humanity® is distributed under a Creative Commons BY-NC-SA 4.0 license. I think their website puts it best:
We give you permission to use the Cards Against Humanity® writing under a limited Creative Commons BY-NC-SA 4.0 license. That means you can use our writing if (and only if) you do all of these things:
- Make your work available totally for free.
- Share your work with others under the same Creative Commons license that we use.
- Give us credit in your project.
If you have questions or paperwork that says otherwise, contact me, we can work this out.