Ejemplo n.º 1
0
                public static PhpString Serialize(Context ctx, PhpValue variable, RuntimeTypeHandle caller)
                {
                    ObjectWriter writer;

                    variable.Accept(writer = new ObjectWriter(ctx, caller));
                    return(new PhpString(writer._result));
                }
Ejemplo n.º 2
0
                public static PhpString Serialize(Context ctx, PhpValue variable, JsonEncodeOptions encodeOptions, RuntimeTypeHandle caller)
                {
                    ObjectWriter writer;

                    variable.Accept(writer = new ObjectWriter(ctx, encodeOptions, caller));
                    return(writer._result);
                }
Ejemplo n.º 3
0
                public static string Serialize(Context ctx, PhpValue variable, JsonEncodeOptions encodeOptions, RuntimeTypeHandle caller)
                {
                    var str = StringBuilderUtilities.Pool.Get();

                    variable.Accept(new ObjectWriter(ctx, str, encodeOptions, caller));

                    return(StringBuilderUtilities.GetStringAndReturn(str)); // note: str is cleared
                }