Skip to content

Instantly share code, notes, and snippets.

OliverF / JBeamToJSON.cs
Created Sep 30, 2015
In, the configuration files use the proprietary standard "JBeam", which is very similar to JSON but with more relaxed rules. This C# function converts JBeam strings into JSON, so that they can be parsed and edited easily by some 3rd party JSON library. There's some lazy programming here that could be cleaned up, but I have since sto…
View JBeamToJSON.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
private static string JBeamToJSON(string jbeamtext)
jbeamtext = Regex.Replace(jbeamtext, @"//.*\r\n", delegate(Match match)