Click here to Skip to main content
12,350,653 members (23,443 online)
Click here to Skip to main content

Tagged as

Stats

39.8K views
1.7K downloads
81 bookmarked
Posted

Small LINQ to JSON Library

, 6 Dec 2011 CPOL
A small LinqToJSON library in C#, and how it works

namespace Ranslant.JSON.Linq
{
    public class JTrue : IJValue
	{
        /// <summary>
        /// The boolean value of JTrue
        /// </summary>
        public bool Content
        {
            get
            {
                return true;
            }
        }

        #region IJValue Members
        public new string ToString()
        {
            // I do not use Content.ToString() because I want to keep the JSON string 
            // representation of this object independent of C#
            return JToken.True;
        }

        public string ToString(int indentLevel)
        {
            return this.ToString();
        }

       #endregion
  }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Guillaume Ranslant
Software Developer IPG
Germany Germany
since 2010: C# with WPF
since 2002: C++ (MFC / QT)
since 1995: C, Java, Pascal


"if a drummer can do it, anobody can" - Bruce Dickinson

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160621.1 | Last Updated 6 Dec 2011
Article Copyright 2011 by Guillaume Ranslant
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid