You can generate a nested set of JSON objects from an array of strings using LINQ and a JSON serializer (either json.net or javascriptserializer) as follows:
var input = new[]{"A","B","C","D"};
var data = input
.Reverse()
.Aggregate((object)null, (a, s) => a == null ? (object)s : new Dictionary<string, object>{ { s, a } });
var json = JsonConvert.SerializeObject(data, Formatting.Indented);
The algorithm works by walking the incoming sequence of strings in reverse, returning the string itself for the last item, and returning a dictionary with an entry keyed by the current item and valued by the previously returned object for subsequent items. The returned dictionary or string subsequently can be serialized to produce the desired result.
Demo fiddle here.