Sadly, I find that the WCF 4.0 source is not available, which is when this feature was implemented.
Does anyone know of any frameworks or projects that people have worked on that convert base types their corresponding JSON representation?
Remember, there is no "instance" created, so there is no simple just serialize this object and return it that you can do. I'd have to dynamically construct the object and translate types, which is the code I looking to pull from a framework or project that
has already ran into issues like "what type do I use to represent an IEnumerable, IDictionary, etc"
digitalpacma...
Member
183 Points
148 Posts
Converting WCF help service page into WebApi
Jul 11, 2012 03:45 PM|LINK
Hello,
Our team used to rely no the help service page provided by the old web api preview 6.
http://msdn.microsoft.com/en-us/library/ee230442.aspx
I have since been trying to restore this functionality.
Sadly, I find that the WCF 4.0 source is not available, which is when this feature was implemented.
Does anyone know of any frameworks or projects that people have worked on that convert base types their corresponding JSON representation?
Remember, there is no "instance" created, so there is no simple just serialize this object and return it that you can do. I'd have to dynamically construct the object and translate types, which is the code I looking to pull from a framework or project that has already ran into issues like "what type do I use to represent an IEnumerable, IDictionary, etc"
Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: Converting WCF help service page into WebApi
Jul 11, 2012 04:21 PM|LINK
using Web API we can return or accet only JSON object
please check http://www.tariqat.org/blog for json convertion
digitalpacma...
Member
183 Points
148 Posts
Re: Converting WCF help service page into WebApi
Jul 11, 2012 04:23 PM|LINK
I do not understand what you are trying to say.
I am not trying to serialize my object to JSON.
I am trying to provide help documention by generating JSON templates based on the types defined on my actions.
panesofglass
Participant
758 Points
242 Posts
Re: Converting WCF help service page into WebApi
Jul 11, 2012 06:06 PM|LINK
You can use IApiExplorer, which is in the RC. The full help page is coming after RTM. I think you may find something in the latest source drops.
digitalpacma...
Member
183 Points
148 Posts
Re: Converting WCF help service page into WebApi
Jul 11, 2012 06:14 PM|LINK
You are correct. I am using ApiExplorer.
But ApiExplorer does not create sample JSON. I am trying to get back what the WCF help used to expose.