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

Feature request: Json.value for object wrappers of primitive types (null support) #90

Open
Aison0 opened this issue Mar 30, 2018 · 1 comment

Comments

@Aison0
Copy link

Aison0 commented Mar 30, 2018

Is it possible it add versions of Json.value that take the wrapped type of supported primitive types? See example below

  public static JsonValue value(boolean value) {
    return value ? TRUE : FALSE;
  }

  public static JsonValue value(Boolean value) {
    return value != null? value ? TRUE : FALSE : NULL;
  }
@bernardosulzbach
Copy link
Contributor

I'm not against the idea, but maybe this does not belong to minimal JSON.

As you have shown, your own minimal-json wrapper code can quite easily have a single line method that does exactly this.

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