static JsonRemotingRequestBody()
        {
            SerializationConfig <JsonRemotingRequestBody> .RegisterSerializer(arg =>
            {
                if (arg == null)
                {
                    return(new Dictionary <string, object>()
                           .SerializeToString());
                }

                return(arg.Parameters
                       .Select(x => new[]
                {
                    x.Key,
                    x.Value.SerializeObject()
                })
                       .SerializeToString());
            });

            SerializationConfig <JsonRemotingRequestBody> .RegisterDeserializer(arg =>
            {
                var items   = arg.Deserialize <string[][]>();
                var results = items
                              .Select(x =>
                {
                    return(new KeyValuePair <string, object>(x[0], x[1].DeserializeObject()));
                })
                              .ToDictionary(x => x.Key, x => x.Value);

                return(new JsonRemotingRequestBody
                {
                    Parameters = results
                });
            });
        }
        static JsonRemotingResponseBody()
        {
            SerializationConfig <JsonRemotingResponseBody> .RegisterSerializer(arg =>
            {
                var dict = new Dictionary <string, string>
                {
                    { nameof(Value), arg.Value.SerializeObject() }
                };

                return(dict.SerializeToString());
            });

            SerializationConfig <JsonRemotingResponseBody> .RegisterDeserializer(arg =>
            {
                var dict = arg.Deserialize <Dictionary <string, string> >();
                dict.TryGetValue(nameof(Value), out var value);

                return(new JsonRemotingResponseBody
                {
                    Value = value.DeserializeObject()
                });
            });
        }