${iServerJava6R_NAResultMapParameter_Title}

${iServerJava6R_NAResultMapParameter_Description}

        /// <summary>${iServerJava6R_NAResultMapParameter_method_FromJson_D}</summary>
        /// <returns>${iServerJava6R_NAResultMapParameter_method_FromJson_return}</returns>
        /// <param name="json">${iServerJava6R_NAResultMapParameter_method_FromJson_param_jsonObject}</param>
        public static NAResultMapParameter FromJson(JsonObject json)
        {
            if (json == null)
                return null;

            NAResultMapParameter result = new NAResultMapParameter();
            result.BackgroundTransparent = (bool)json["backgroundTransparent"];
            result.Bounds = JsonHelper.ToRectangle2D((JsonObject)json["bounds"]);
            result.Center = JsonHelper.ToPoint2D((JsonObject)json["center"]);
            result.Format = (OutputFormat)Enum.Parse(typeof(OutputFormat), (string)json["format"], true);
            result.Scale = (double)json["scale"];
            result.Style = ServerStyle.FromJson((JsonObject)json["style"]);
            result.UseDefaultParameter = (bool)json["useDefaultParameter"];
            result.Viewer = JsonHelper.ToRect((JsonObject)json["viewer"]);

            return result;
        }
        internal static string ToJson(NAResultMapParameter param)
        {
            if (param != null)
            {
                string json = "{";
                List<string> list = new List<string>();

                list.Add(string.Format("\"backgroundTransparent\":{0}", param.BackgroundTransparent.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLower()));
                list.Add(string.Format("\"useDefaultParameter\":{0}", param.UseDefaultParameter));

                if (param.Bounds != Rectangle2D.Empty)
                    list.Add(string.Format("\"bounds\":{0}", JsonHelper.FromRectangle2D(param.Bounds)));
                if (param.Center != Point2D.Empty)
                    list.Add(string.Format("\"center\":{0}", JsonHelper.FromPoint2D(param.Center)));
                list.Add(string.Format("\"format\":\"{0}\"", param.Format));
                if (param.Scale != 0)
                    list.Add(string.Format(System.Globalization.CultureInfo.InvariantCulture, "\"scale\":\"{0}\"", param.Scale));
                if (param.Style != null)
                    list.Add(string.Format("\"style\":\"{0}\"", ServerStyle.ToJson(param.Style)));
                if (param.Viewer != null)
                    list.Add(string.Format("\"viewer\":{0}", string.Format(System.Globalization.CultureInfo.InvariantCulture, "{{\"leftTop\":{{\"x\":0,\"y\":0}},\"rightBottom\":{{\"x\":{0},\"y\":{1}}}}}", param.Viewer.Width, param.Viewer.Height)));

                json += string.Join(",", list.ToArray());
                json += "}";
                return json;
            }
            return null;
        }