Iterable / iterable-play-utils

Iterable's Utilities for Play Framework for Scala
Apache License 2.0
11 stars 0 forks source link

add support for mixed json parsing #3

Open dontgitit opened 7 years ago

dontgitit commented 7 years ago

for example,

case class Foo(
  hello: String,
  @JsonParse
  world: List[Int]
)

Normally, you would need to submit a payload like this to match Foo

hello=something
world[0]=198
world[1]=897123
world[2]=9

We want to allow:

hello=something
world={198, 897123, 9}

It seems a @JsonParse annotation or something like that could do the trick

gmethvin commented 6 years ago

idk, why not just make the whole thing json if you're gonna use json?

dontgitit commented 6 years ago

this is most useful for things that are already done with forms and have simple fields, but we need to add some more complicated thing