예제 #1
0
        /// <summary>
        /// Returns this route as json.
        /// </summary>
        public static string ToJson(this Route route)
        {
            var stringWriter = new StringWriter();

            route.WriteJson(stringWriter);
            return(stringWriter.ToInvariantString());
        }
예제 #2
0
 /// <summary>
 /// Writes the route as json.
 /// </summary>
 public static void WriteJson(this Route route, Stream stream)
 {
     route.WriteJson(new StreamWriter(stream));
 }