Skip to content

Instantly share code, notes, and snippets.

@trane
Last active August 29, 2015 14:11
Show Gist options
  • Save trane/fd09c35ed9c28caa11c6 to your computer and use it in GitHub Desktop.
Save trane/fd09c35ed9c28caa11c6 to your computer and use it in GitHub Desktop.
# case class Stuff(name: String, value: String)
# Set[Stuff]
[{"name": "a", "value": "1"}, {"name": "123", "value": "something"}, {"name": "$#!@", "value": "other"}]
# What if the key constructors are inferred?
# How do you create a Set[Stuff]?
{"a": "1", "123": "something", "$#!@": "other"}
# this is relatively easy to do via an intermediate representation
# Map[String, String] -> Set[Stuff]
# but, I would like to not have to use an intermediate representation
# how would I do this from the DecodeJson method?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment