Missing method error

Jun 4, 2009 at 4:39 PM
Edited Jun 4, 2009 at 4:39 PM

Hi,

I am using VB.net with vs2005.

I have dowloaded the CF2 compatible version of Json.net, added the dll and refrenced it in my project.

I am getting the following error:

Method not found: GetConverter System.ComponentModel.TypeDescriptor.

on the following line:

 

<font size="1">

 

</font>

 

Dim deserializedProduct As JsonLogin = DirectCast(Newtonsoft.Json.JavaScriptConvert.DeserializeObject(lReturn, GetType

(JsonLogin)), JsonLogin)

 

 

 I am getting the exact same error if i rewrite code like this:

 <font size="1">

 

</font>


Dim
lObj As New JsonLogin

lObj = Newtonsoft.Json.JavaScriptConvert.DeserializeObject(lReturn)

Can any one help?

All i want to do is parse a string variable holding a json string.

 

Thanks in advance

Coordinator
Jun 5, 2009 at 6:18 AM

Hmm, looks like it is available in my version of the CF framework but isn't available according to the documentation:

http://www.eggheadcafe.com/conversation.aspx?messageid=30616205&threadid=30616205

http://msdn.microsoft.com/en-us/library/system.componentmodel.typedescriptor_methods.aspx

I'll fix this in the next couple of days. I'll let you know when the fix is checked into the latest version of the source code on CodePlex so you can download it.

 

~ James

Jun 5, 2009 at 8:55 AM
Edited Jun 5, 2009 at 9:16 AM

James,

Thanks for that, Any changes will still work on Compact framework 2 ? Also will you provide a new dll?
I forgot to post the version of Json.net i am using, it is v1.3.1 (CF2 compatible).

Look forward to your fix :)

yasir

 

Coordinator
Jun 6, 2009 at 12:27 AM

Eh?

I never made a compact framework version of 1.3.1 for CF2. I thought you were talking about the latest version of Json.NET for the most recent version of the CF.

Jun 8, 2009 at 1:58 PM

James,

I have downloaded the latest version of Json.net which is for CF 3.5. I added the newtonsoft.json.compact.dll to my project. New problem, I can no longer see the following method

newtonsoft.json.javascriptconvert .

How do i convert a Json string into somthing i can handle, have you got an example for me, buy the way I am using VB and not C#

Thanks again

 

Jun 8, 2009 at 3:04 PM

James,

got another missing method error

Method not found: Resize System.Array.

I am doing the following:

 <font size="1" color="#0000ff">

Dim

</font>

deserialized As JsonLogin = DirectCast(Newtonsoft.Json.JsonConvert.DeserializeObject(lReturn, GetType(JsonLogin)), JsonLogin)

To my VBproject all i did was add the newtonsoft.json.compact.dll as a reference, am i missing somthing else? 

 

Jun 9, 2009 at 9:05 AM

James,

GOT IT WORKING!!!!

sorry for being a pain but it was my mistake :(

basically i was refrencing the Compactframework 2.00 dlls and not 3.5.

soon as removed those and used 3.5 then no more errors.

BAffoon!

Thanks anyways, I am sure i'll have a few more questions, hopefully not as silly as this problem.