Thank you very much for confirming.

On Sep 2, 11:10 pm, John Simons <[email protected]> wrote:
> >Will I have to just create a new struct and loop through all the ...
>
> Yes
>
> The current implementation of JSONReturnBinder has you mentioned
> before doesn't support the dot notation Properties.
> You not the first person to ask for this.
> We would welcome a patch or otherwise add a suggestion 
> tohttp://castle.uservoice.com/
>
> Cheers
> John
>
> On Sep 3, 2:02 pm, JakeS <[email protected]> wrote:
>
> > I've got a fairly complex object, and I want to send "select"
> > information from an array of them to JSON.  But I can't get it to
> > serialize properly.
>
> > class Ticket
> > {
> >   public ScheduledInstall TimeOfInstall{get;set;}
> >   public ContactInfo UserInformation{get;set}
>
> > }
>
> > class ScheduledInstall
> > {
> >   public Ticket Ticket{get;set;}
> >   public DateTime InstallDate{get;set;}
>
> > }
>
> > class Technician
> > {
> >   public IList<ScheduledInstall> Schedule{get;set;}
>
> > }
>
> > All's working with ActiveRecord in the database, but when I try to
> > serialize it using JSONReturnBinder it hangs (probably because of the
> > recursion).  I put a [JsonIgnore] attribute on the Ticket property of
> > the scheduledinstall, but that doesn't seem to work.
>
> > For this particular instance, I really just want an array of DateTimes
> > and ContactInfo.Addresses.  So I tried using the following on my
> > returnbinder:
> > [return: JSONReturnBinder(Properties =
> > "JobType,Ticket.ContactInfo.Address")]
>
> > But that won't work either -- JSONReturnBinder doesn't seem to be able
> > to go deep into Properties like that.
>
> > Will I have to just create a new struct and loop through all the
> > scheduledinstalls for the technician like so:
>
> > struct CalendarView
> > {
> >   DateTime dateOfInstall;
> >   string Address;}
>
> > foreach(var install in thisTech.Schedule)
> > {
> >   var calendarItem = new CalendarView{...}
> >   //Add to my return array
>
> > }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to