ln.json/JSONArray.cs

38 lines
628 B
C#

using System;
using System.Text;
using System.Collections.Generic;
namespace sharp.json
{
public class JSONArray : JSON
{
public JSONArray()
:base(JSONTypes.Array){}
public override bool isTrue()
{
throw new NotImplementedException();
}
public override string prettyPrint(int d = 0)
{
return ToString();
}
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("[");
for (int n=0;n<this.Count;n++)
{
sb.Append(this[n].ToString());
if (n+1 < this.Count){
sb.Append(",");
}
}
sb.Append("]");
return sb.ToString();
}
}
}