private void ClumpJsonFromDirectoryIntoFile(string sourceDirectoryPath) { var clumpedFilepath = Path.Combine(configuration.OutputDirectory, "xaml.json"); using (var clumpedWriter = new JsonWriter(clumpedFilepath)) { clumpedWriter.StartBlock(); foreach (var jsonFile in Directory.GetFiles(sourceDirectoryPath, "*.json")) { var propertyName = Path.GetFileName(jsonFile); clumpedWriter.WriteRawProperty(propertyName, File.ReadAllText(jsonFile)); } clumpedWriter.EndBlock(); } }
private void ParseElement(JsonWriter writer) { writer.StartBlock(); writer.WriteProperty("$ElementType", current.LocalName); ParseElementAttributes(writer); ParseElementChildren(writer); writer.EndBlock(); }