Reputation:
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
}
Upvotes: 0
Views: 184
Reputation: 7898
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?
Upvotes: 3