Skip to main content
added 9 characters in body
Source Link
Niall
  • 1.9k
  • 1
  • 18
  • 21

It depends. How is the result meant or expected to be used?

If it should be a string (i.e. no associated json semantics), thethen return theit as a string.

If you wish to use of the facilities associated with the json data, then keep the JsonResult.

If you are unsure, keep the JsonResult and let the client convert it if they require it to be just a string.If you are unsure, keep the JsonResult and let the client convert it if they require it to be just a string.

It depends. How is the result meant or expected to be used?

If it should be a string (i.e. no associated json semantics), the return the string.

If you wish to use of the facilities associated with the json data, then keep the JsonResult.

If you are unsure, keep the JsonResult and let the client convert it if they require it to be just a string.

It depends. How is the result meant or expected to be used?

If it should be a string (i.e. no associated json semantics), then return it as a string.

If you wish to use of the facilities associated with the json data, then keep the JsonResult.

If you are unsure, keep the JsonResult and let the client convert it if they require it to be just a string.

Source Link
Niall
  • 1.9k
  • 1
  • 18
  • 21

It depends. How is the result meant or expected to be used?

If it should be a string (i.e. no associated json semantics), the return the string.

If you wish to use of the facilities associated with the json data, then keep the JsonResult.

If you are unsure, keep the JsonResult and let the client convert it if they require it to be just a string.