Self Hosted WCF Rest service ERROR : Type 'Newtonsoft.Json.Linq.JToken' is a recursive collection data contract which is not supported -


i have wcf rest service that's self hosted. works fine until decided have use jtoken (newtonsoft.json.linq.jtoken). got error :

type 'newtonsoft.json.linq.jtoken' recursive collection data contract not supported. consider modifying definition of collection 'newtonsoft.json.linq.jtoken' remove references itself. 

i've seen answers post, one , others. fact is, i'm hosting services within internal program (in company work, can't show :-( ). i'm doing it's self hosted, implementations , interfaces of services aren't wcf service library, class library, can't access menu they're talking in answers (where there's : "reuse types in specified referenced assemblies").

i couldn't find solution , use jtoken.

here's service contract :

[servicecontract]     public interface isearchservice     {         [operationcontract]         [webinvoke(method = "post", requestformat = webmessageformat.json, responseformat = webmessageformat.json,             uritemplate = "search/")]         list<client> searchclient(jtoken jsonbody);     } 

my hosting done in post : how create wcf endpointbehaviors in code rather configuration? (i had without configuration file).

hope question clear. thank help


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -