I have a large php string that consists of json style data and need to somehow convert this into a json object. My string looks like something below: (it is one BIG string). Syntax for the string isn't exactly what I attached below but it's just an example. How would I convert a string lik $string below into a json object? Thanx.
$string = "
{
\"name\": \"flare\",
\"children\": [
{
\"name\": \"analytics\",
\"children\": [
{
\"name\": \"cluster\",
\"children\": [
{\"name\": \"AgglomerativeCluster\", \"size\": 3938},
{\"name\": \"CommunityStructure\", \"size\": 3812},
{\"name\": \"HierarchicalCluster\", \"size\": 6714},
{\"name\": \"MergeEdge\", \"size\": 743}
]
}
]
}
]
}
";