You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
644 B
27 lines
644 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace RS.Common
|
|
{
|
|
public class JsonHelp
|
|
{
|
|
public static bool IsJsonStart(string json)
|
|
{
|
|
if (!string.IsNullOrEmpty(json))
|
|
{
|
|
json = json.Trim('\r', '\n', ' ');
|
|
if (json.Length > 1)
|
|
{
|
|
char s = json[0];
|
|
char e = json[json.Length - 1];
|
|
return (s == '{' && e == '}') || (s == '[' && e == ']');
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|