예제 #1
0
    private StringBuilder bufar; // Contains an array of rows

    public static void Main()
    {
        JSONBuilder jb = new JSONBuilder();

        jb.AddRow();
        jb.Put("Greeting", "Hello");
        jb.AddRow();
        jb.Put("Greeting", "World!");
        Console.WriteLine(jb.Build());
    }
        public override string Serialize()
        {
            var builder = new JSONBuilder();

            builder.WriteKeyValuePair(FEE_FIELD_KEY, Fee);
            builder.WriteKeyValuePair(DIVIDEND_ASSET_FIELD_KEY, DividendAsset);
            builder.WriteKeyValuePair(ACCOUNT_FIELD_KEY, Account);
            builder.WriteKeyValuePair(AMOUNTS_FIELD_KEY, Amounts);
            builder.WriteKeyValuePair(EXTENSIONS_FIELD_KEY, Extensions);
            return(builder.Build());
        }
예제 #3
0
        public override string Serialize()
        {
            var builder = new JSONBuilder();

            builder.WriteKeyValuePair(FEE_FIELD_KEY, Fee);
            builder.WriteKeyValuePair(FROM_FIELD_KEY, From);
            builder.WriteKeyValuePair(TO_FIELD_KEY, To);
            builder.WriteKeyValuePair(AMOUNT_FIELD_KEY, Amount);
            builder.WriteOptionalClassKeyValuePair(MEMO_FIELD_KEY, Memo);
            builder.WriteKeyValuePair(EXTENSIONS_FIELD_KEY, Extensions);
            return(builder.Build());
        }
예제 #4
0
        public override string Serialize()
        {
            var builder = new JSONBuilder();

            builder.WriteKeyValuePair(FEE_FIELD_KEY, Fee);
            builder.WriteKeyValuePair(FEE_PAYING_ACCOUNT_FIELD_KEY, FeePayingAccount);
            builder.WriteKeyValuePair(EXPIRATION_TIME_FIELD_KEY, DateTimeConverter.ConvertTo(ExpirationTime));
            builder.WriteKeyValuePair(PROPOSED_OPS_FIELD_KEY, ProposedOperations);
            builder.WriteOptionalStructKeyValuePair(REVIEW_PERIOD_SECONDS_FIELD_KEY, ReviewPeriodSeconds);
            builder.WriteKeyValuePair(EXTENSIONS_FIELD_KEY, Extensions);
            return(builder.Build());
        }