Re: [RavenDB] Json Desrialization Error

115 views
Skip to first unread message
Message has been deleted

Oren Eini (Ayende Rahien)

unread,
Sep 22, 2014, 9:50:04 AM9/22/14
to ravendb
Please show fiddler output as well.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


On Mon, Sep 22, 2014 at 3:48 PM, Nima Ha <hamid...@gmail.com> wrote:
I have written an index and I use projection to convert my document to another type
Here's my type (for projection) :

public class RealEstateFile
{
     public PropertyType{get;set;}
     //other properties (256 of them) is omitted for the sake of simplicity :)
}

And here's the JSON of my query :
Results
[
  • {
    • PropertyType"Apartment",
    • AgriculturalPropertyTypenull,
    • TransactionType"Sale",
    • PostalCode"4567345234",
    • FullAddress"Address",
    • Province"Province1",
    • Region"Region1",
    • Villagenull,
    • ...
    • }
    When I run my query I've got this error and I'm totally confused :
----> Raven.Imports.Newtonsoft.Json.JsonSerializationException : Could not read value for property: PropertyType
  ----> Raven.Imports.Newtonsoft.Json.JsonReaderException : Error reading string. Unexpected token: StartObject.

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kijana Woodard

unread,
Sep 22, 2014, 11:25:47 AM9/22/14
to rav...@googlegroups.com
public class RealEstateFile
{
     public WHAT_IS_THE_TYPE PropertyType {get;set;}
     //other properties (256 of them) is omitted for the sake of simplicity :)
}

Nima Ha

unread,
Sep 23, 2014, 3:46:05 AM9/23/14
to rav...@googlegroups.com
the type is string

Nima Ha

unread,
Sep 23, 2014, 3:47:04 AM9/23/14
to rav...@googlegroups.com
How can I configure RavenDB standalone server.exe to work with fidller ? it seems fiddler doesn't capture it

Nima Ha

unread,
Sep 23, 2014, 4:12:24 AM9/23/14
to rav...@googlegroups.com
OK I've got how to configure RavenDB and Fiddler to work together but now I'm getting another error
It says :

Raven.Imports.Newtonsoft.Json.JsonReaderException : Unexpected character encountered while parsing value: <. Path '', line 0, position 0. 

Nima Ha

unread,
Sep 23, 2014, 4:18:05 AM9/23/14
to rav...@googlegroups.com
OH Sorry to bother you all I get it. I am using projection whilst I should have used a transformer. 

Kijana Woodard

unread,
Sep 23, 2014, 1:33:54 PM9/23/14
to rav...@googlegroups.com
Glad you figure it out. 

I usually see that error when I have a type mismatch.

--
Reply all
Reply to author
Forward
0 new messages