martin-magakian / Amazing-Cloud-Search

Allow you to search, faceted search, add, update, remove objects from your Amazon Cloud Search Index in C#.
30 stars 17 forks source link

SerializeObject not returning fields #3

Closed 5um1th closed 11 years ago

5um1th commented 11 years ago

the following line

var actionJson = JsonConvert.SerializeObject(liAction);

Does not searilize the object results in the following error.

operation must contain at least one field

SerializeObject not returning fields

bit baffled any help will be much appreciated.

issue

Cheers

martin-magakian commented 11 years ago

Is it working when you serialize your objects not contain in List ? Can you post the class you try to serialize ? What is the "real" type of your list liAction ?

5um1th commented 11 years ago

The class I'm trying to serialize the Movie class you provided in the example. So I'm just trying to play with the solution out of the box and created console app. I trying various methods listed in the Read Me and was playing with the add method.

martin-magakian commented 11 years ago

Ok I will have a look at it today or Monday at the latest.

5um1th commented 11 years ago

Thanks Martin. Just so you know I did make sure I got the same version of all the Nuget packages.

martin-magakian commented 11 years ago

Ho maybe that the problem: the nuget package.

Try to checkout the source code from github and give it a try.

martin-magakian commented 11 years ago

So is the problem coming from the nuget package ?

kikura3 commented 11 years ago

Hi Martin, I downloaded the zip from github but i'm facing the same error.

martin-magakian commented 11 years ago

Ok thank both of you for the report. I just fixed it and publish the code on github.

The "Movie" add a "datacontract" annotation who needed to be remove.

See commit: https://github.com/martin-magakian/Amazing-Cloud-Search/commit/3a8afcee200639ee272177191bfcf67370153fdb#AmazingCloudSearch.Test