Skip to content

Instantly share code, notes, and snippets.

@sheki
Created October 17, 2011 17:01
Show Gist options
  • Select an option

  • Save sheki/1293085 to your computer and use it in GitHub Desktop.

Select an option

Save sheki/1293085 to your computer and use it in GitHub Desktop.
def tagJson(tag: String, json: JValue): String = {
val jsonMap = json.asInstanceOf[JObject].values
val hmm = jsonMap.collect {
case (key: String, value) => (tag + "." + key, value)
}
implicit val formats = net.liftweb.json.DefaultFormats
compact(JsonAST.render(decompose(hmm)))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment