0

Is it possible to tell servicestack to allow unquoted properties in JSON?

I have a lot of JSON that I need to send to a service which doesn't have quoted properties - this would help a lot if it can be bound without quoted parameters.

I have this:

{
  color: "blue",
  size: 14
}

Servicestack wants this:

{
  "color": "blue",
  "size": 14
}
4

1 回答 1

3

By definition, JSON keys must be in quotes, as it is a string. What you are displaying here is just javascript object notation.

JSON Spec - does the key have to be surrounded with quotes?

于 2013-08-30T16:04:19.743 回答