Archives

Archives / 2007 / September
  • Sitemaps 1.1 released

    Don't kid yourself, Jimmy. If a cow ever got the chance, he'd eat you and everyone you care about!GoogleSitemap.NET has been renamed and re-released as Sitemaps.NET 1.1. When I originally wrote it in 2005, XML sitemaps were a Google only feature but since then Microsoft, Yahoo and Google have gotten together to create a standard, hence the rename.

    There a couple of changes and bug fixes in 1.1 but nothing major.

    • New feature - Ability to ignore URLs in your ASP.NET sitemap by adding the attribute sitemapsIgnore="true"
    • Change - Renamed from GoogleSitemap.NET to Sitemaps.NET to reflect the new standard at http://www.sitemaps.org
    • Change - Namespace updated to http://www.sitemaps.org/schemas/sitemap/0.9
    • Bug fix - Fixed culture issues related to writing the decimal point in a URL's priority

    While I was putting Visual Studio's rename refactor through its paces I also changed the license, created a Sitemaps.NET page on my blog here and created a CodePlex project containing the source. Links below.

    Sitemaps.NET CodePlex Project

    Sitemaps.NET 1.1 Download

  • Json.NET 1.3 + New license + Now on CodePlex

    Homer: Welcome to the internet my friend, how can I help you? Comic Book Guy: I'm interested in upgrading my twenty eight point eight kilobaud internet connection to a one point five megabit fibre-optic T-1 line. Will you be able to provide an IP router that's compatable with my token ring ethernet LAN configuration? Homer: (long pause) Can I have some money now? Since the last release of Json.NET JSON's popularity and usage has continued to grow, with many people taking the time to report bugs and make suggestions. This latest version addresses all known bugs and adds a few of the most requested features.

    • New feature - Added JsonPropertyAttribute. This attribute lets you define the name of a JSON property when serializing and deserializing. It is equivalent to XmlElementAttribute for XML serialization.
    • New feature - JsonSerializer now supports deserializing read only collections and has better support for custom collections.
    • Change - Improved JavaScript string escaping.
    • Bug fix - XmlNodeConverter now correctly writes integers, floats, booleans and dates in elements.
    • Bug fix - JSON text that ends with whitespace no longer causes the JsonReader to enter an infinite loop.
    • Bug fix - Fix for culture issues with DateTimes and doubles when deserializing.

    What's New

    The most notable new feature is the ability to control the name of the JSON property a .NET property will serailize to and from using an attribute. For example if you want the BillingAddress property on your Person .NET class to be serialized as billing_address on your JSON object, just add the JsonPropertyAttribute to the BillingAddress in .NET and set the PropertyName to billing_address. This feature is equivalent to the functionality the XmlElementAttribute providers for XML serialization.

    public class Person

    {

      private Guid _internalId;

      private string _firstName;

     

      [JsonIgnore]

      public Guid InternalId

      {

        get { return _internalId; }

        set { _internalId = value; }

      }

     

      [JsonProperty("first_name")]

      public string FirstName

      {

        get { return _firstName; }

        set { _firstName = value; }

      }

    }

    New license

    I have changed the license Json.NET is provided under to the MIT license. Json.NET previously used a Creative Commons license, a license which is more commonly used with media than software. Also since Creative Commons isn't compatible with the GPL I have regularly been getting emails asking whether it is ok to use Json.NET in a GPL licensed project, which I have no problem with.

    I chose the MIT license because it is the least restrictive license in common use that I could find. Json.NET is yours to do with it as you want [:)]

    Codeplex

    Finally, I've created a CodePlex project for Json.NET and uploaded the source code plus this release. I've downloaded many projects off CodePlex since it was created but this will be the first time I've set one up. Hopefully Codeplex will be beneficial to Json.NET (plus a good learning experience [:)])

    Json.NET CodePlex Project

    Json.NET 1.3.1 Download - Json.NET source code and binaries

    Update:

    There was a bug in 1.3's JavaScript string escaping. It has been corrected in Json.NET 1.3.1 which is now on CodePlex.