Skip to content

Instantly share code, notes, and snippets.

@anuragsrivastava06
Created April 15, 2018 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anuragsrivastava06/e3981f06feadb2d3477732ee226da35e to your computer and use it in GitHub Desktop.
Save anuragsrivastava06/e3981f06feadb2d3477732ee226da35e to your computer and use it in GitHub Desktop.
implicit val writer1: JsonWriter[String] = JsonWriterInstances.stringWriter
implicit val writer2: JsonWriter[String] = JsonWriterInstances.stringWriter
Json.toJson("A string")
<console>:27: error: ambiguous implicit values:
both value stringWriter in object JsonWriterInstances of type => JsonWriter[String]
and value writer1 of type => JsonWriter[String]
match expected type JsonWriter[String]
Json.toJson("A string")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment