Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for fully typesafe generation #12

Open
sherifkandeel opened this issue Sep 27, 2018 · 1 comment
Open

Add option for fully typesafe generation #12

sherifkandeel opened this issue Sep 27, 2018 · 1 comment

Comments

@sherifkandeel
Copy link

sherifkandeel commented Sep 27, 2018

To follow a complete typesafe approach, leaf level values should NOT be converted to primitive types. but instead, to value classes

e.g.

{
  "id": 2,
  "name": "Steve Nash",
  "score": 4.23
}

should be

case class R00tJsonObject(id: Id, name: Name, score: Score)
case class Id (value: Int) extends AnyVal
case class Name(value: String) extends AnyVal
case class Score(value: Double) extends AnyVal
@Daenyth
Copy link

Daenyth commented Dec 1, 2020

I'd like to see this as a button on the analysis panel, next to the Optional checkbox (maybe in addition to the full-auto approach described above).

When modifying the type name of a field in the analysis area for a primitive type, it should generate the value class wrapper for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants