/*
JSONSharp, a c# library for generating strings in JSON format
Copyright (C) 2007 Jeff Rodenburg
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
If you have questions about the library, please contact me at jeff.rodenburg@gmail.com.
*/
using System;
using System.Collections.Generic;
using System.Text;
using JSONSharp;
namespace JSONSharp.Values
{
///
/// JSONBoolValue represents a boolean value in JSONSharp.
///
public class JSONBoolValue : JSONValue
{
private bool _value;
///
/// Simple public instance constructor that accepts a boolean.
///
/// boolean value for this instance
public JSONBoolValue(bool value)
: base()
{
this._value = value;
}
///
/// Required override of the ToString() method.
///
/// boolean value for this instance, as text and lower-cased (either "true" or "false", without quotation marks)
public override string ToString()
{
return this._value.ToString().ToLower();
}
///
/// Required override of the PrettyPrint() method.
///
/// this.ToString()
public override string PrettyPrint()
{
return this.ToString();
}
}
}