Example #1
0
static void JsonWriteNonce(JsonWriter& writer, int nonce)
{
    WriteKey(writer, "nonce");
    char nonceBuffer[32];
    NumberToString(nonceBuffer, nonce);
    writer.String(nonceBuffer);
}
Example #2
-1
void WriteOptionalString(JsonWriter& w, T& k, const char* value)
{
    if (value && value[0]) {
        w.Key(k, sizeof(T) - 1);
        w.String(value);
    }
}