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

Output is not using camel case #49

Closed
jmpease opened this issue Feb 10, 2017 · 0 comments
Closed

Output is not using camel case #49

jmpease opened this issue Feb 10, 2017 · 0 comments

Comments

@jmpease
Copy link
Contributor

jmpease commented Feb 10, 2017

The default JsonOutputFormatter uses camel case formatting. See aspnet/Mvc#4283

It appears the JsonHalOutputFormatter is not using the same output settings, however, so when requesting a type handled by this formatter the output looks like this:

{
  "id": 1,
  "type": "foo",
  "CamelCase": "this should be camelCase",
  "_links": {
    "foo:bar": {
      "href": "/api/foo/1/bar"
    },
    "self": {
      "href": "/api/foo/1",
      "method": "GET"
    }
  }
}

whereas a request for "application/json" handled by the JsonOutputFormatter results in this:

{
  "id": 1,
  "type": "foo",
  "camelCase": "this should be camelCase",
  "_links": {
    "foo:bar": {
      "href": "/api/foo/1/bar"
    },
    "self": {
      "href": "/api/foo/1",
      "method": "GET"
    }
  }
}
jmpease added a commit to ensembleVideo/halcyon that referenced this issue Feb 10, 2017
Pass serializer settings to JsonSerializer.
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