Dictionary as the parameter method

42 views
Skip to first unread message

s.am...@teravintech.com

unread,
Aug 19, 2013, 7:02:15 AM8/19/13
to jay...@googlegroups.com
Can Jayrock handle this kind of json?

json:
{
 "AA" : {"0001" : {"C1":"c1", "C2":"121"}, "0002" : {"C1":"c2", "C2":"232"}},
 "ZZ" : "zzz"
}


in service:
public object eV(Dictionary<string, object>AA, string ZZ){
}

in eV method, AA is always return empty dictionary.
Did i miss something?

Please Help,
Thank you so much

Atif Aziz

unread,
Aug 19, 2013, 8:37:21 AM8/19/13
to jay...@googlegroups.com
Use IDictionary<string, object> instead of Dictionary<string, object>. The former is a public interface whereas the latter is an implementation for private use so Jayrock naturally supports the former. In the end, you'll notice that the actual concrete object you'll get at run-time is Dictionary<string, object>.

- Atif


--
You received this message because you are subscribed to the Google Groups "Jayrock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jayrock+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages