public static AXCamera AXCameraFromJSON(AX.SimpleJSON.JSONNode jn) { AXCamera axcam = new AXCamera(); axcam.alpha = jn["alpha"].AsFloat; axcam.beta = jn["beta"].AsFloat; axcam.radius = jn["radius"].AsFloat; axcam.radiusAdjuster = jn["radiusAdjuster"].AsFloat; return(axcam); }
// JSON SERIALIZATION public static string AXCameraAsJSON(AXCamera axcam) { StringBuilder sb = new StringBuilder(); sb.Append("{"); sb.Append(" \"alpha\":\"" + axcam.alpha + "\""); sb.Append(",\"beta\":\"" + axcam.beta + "\""); sb.Append(",\"radius\":\"" + axcam.radius + "\""); sb.Append(",\"radiusAdjuster\":\"" + axcam.radiusAdjuster + "\""); // finish sb.Append("}"); // end parametri_object return(sb.ToString()); }