So you want to write a JSON service for your Silverlight application? Basically this entire thing is a giant hack. first JSON is just the string syntax for JavaScript so it is not like a real protocol of course I get a bit of heart burn calling 'SOAP' a real protocol but really a JavaScript array defintion being a 'protocol' you must admit is a bit of a stretch but ok I can go with it.
Anyway so quick a dirty in your 'Silverlight' web site project in visual studio you can create a JSON service out of any ASPX page. First 'create' your ASPX page. then remove everything so it looks like this:
< % @ Page Language="C#" AutoEventWireup="true" CodeFile="JSON.aspx.cs" Inherits="JSON" % >
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="JSON.aspx.cs" Inherits="JSON" %>
note that 'JSON' is just what I happened to call this page.
so then just right click on the page and click view code. You'll see that you have basically one method 'Page_Load'. here basically we just need to write out whatever it is we need in the form of a javascript array. So for example here is a very simple one:
StringBuilder JSON = new StringBuilder();
string ItemDelimter = string.Empty;
JSON.Append(ItemDelimter + "\"1\" : \"john doe\" ");
ItemDelimter = " , ";
JSON.Append(ItemDelimter + "\"2\" : \"jill doe\" ");
JSON.Append(ItemDelimter + "\"3\" : \"jane doe\" ");
JSON.Append(ItemDelimter + "\"4\" : \"jared doe\" ");
JSON.Append(ItemDelimter + "\"5\" : \"jeff doe\" ");
Response.Write("[ { " + JSON.ToString() + " } ] ");
Response.End();
Note that you'll need to add System.Text for the above code but you can basically generate the out put anyway you want and accept input parameters as query string values.