CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets My Favorites Favorites Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of json
C#
// JavaScript Code
$().ready(function () {
 
    ajaxCallMethod("CallbackHandler.ashx?", "GetDate",
    [{ Name: "Rick", Entered: new Date(2012,0,1) }],
    function (result) {
        alert(result);
    });
 
by Rick Strahl   March 19, 2012 @ 4:38pm
189 Views
no comments
 
 ajaxCallMethod("CallbackHandler.ashx?", "Test",
             [{ Entered: "03/15/2010", Name: "Rick"}],
             function (result) {
                 alert(result);
             });
ajaxCallMethod("CallbackHandler.ashx?", "Test",
             [{ Entered: new Date(2010,2,15), Name: "Rick"}],
             function (result) {
                 alert(result);
by Rick Strahl   March 19, 2012 @ 2:10pm
153 Views
no comments
 
C#
using System;
using System.Net.Http.Formatting;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using System.Json;
using System.IO;
 
namespace Westwind.Web.WebApi
{
by Rick Strahl   March 08, 2012 @ 5:17pm
839 Views
no comments
 
/* Google jquery CDN 
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> */
   
            $.ajax(
            {
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: "services/FeedService.svc/ServiceMethod",
                data: '{"param1":"data1" , "param2":"data2"}',
by frank2tek   October 04, 2011 @ 11:25am
186 Views
no comments
 
/// <reference path="jquery.js" />
/*
ServiceProxy.js  
Version 0.981 - 4/5/11

(c) 2008-2011 Rick Strahl, West Wind Technologies 
www.west-wind.com

Load json2.js before this library
by Rick Strahl   April 12, 2010 @ 6:40pm
Tags: JSON, Ajax, Date, ASMX, WCF
5627 Views
no comments
 
if (JSON && !JSON.parseWithDate) {
    var reISO = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/;
    var reMsAjax = /^\/Date\((d|-|.*)\)[\/|\\]$/;
 
    JSON.parseWithDate = function(json) {
        /// <summary>
        /// parses a JSON string and turns ISO or MSAJAX date strings
        /// into native JS date objects
        /// </summary>    
by Rick Strahl   September 15, 2009 @ 3:31pm
1479 Views
no comments
 
C#
[TestClass]
public class DateConversionTests
{
    public DateConversionTests()
    {
    }        
 
 
    [TestMethod]
by Rick Strahl   September 15, 2009 @ 12:46pm
1164 Views
no comments
 
brought to you by:
West Wind Techologies