Commit 8973b279 authored by Mikhail Boldyrev's avatar Mikhail Boldyrev

fixed Uint case in docs

parent d87b698d
......@@ -79,7 +79,7 @@ The following tables show the data layout of each type. The 32-bit/64-bit column
| `unsigned u` | 32-bit unsigned integer |4 |4 |
| (zero padding) | 0 |4 |4 |
| (unused) | |4 |8 |
| `unsigned flags_` | `kNumberType kNumberFlag kUIntFlag kUInt64Flag ...` |4 |4 |
| `unsigned flags_` | `kNumberType kNumberFlag kUintFlag kUint64Flag ...` |4 |4 |
| Number (Int64) | |32-bit|64-bit|
|---------------------|-------------------------------------|:----:|:----:|
......
......@@ -79,7 +79,7 @@ SAX 和 DOM API 都依赖于3个额外的概念:`Allocator`、`Encoding` 和 `
| `unsigned u` | 32位无符号整数 |4 |4 |
| (零填充) | 0 |4 |4 |
| (未使用) | |4 |8 |
| `unsigned flags_` | `kNumberType kNumberFlag kUIntFlag kUInt64Flag ...` |4 |4 |
| `unsigned flags_` | `kNumberType kNumberFlag kUintFlag kUint64Flag ...` |4 |4 |
| Number (Int64) | | 32位 | 64位 |
|---------------------|-------------------------------------|:----:|:----:|
......
......@@ -37,7 +37,7 @@ Bool(false)
Key("n", 1, true)
Null()
Key("i")
UInt(123)
Uint(123)
Key("pi")
Double(3.1416)
Key("a")
......
......@@ -37,7 +37,7 @@ Bool(false)
Key("n", 1, true)
Null()
Key("i")
UInt(123)
Uint(123)
Key("pi")
Double(3.1416)
Key("a")
......
......@@ -82,7 +82,7 @@ JSON number type represents all numeric values. However, C++ needs more specific
~~~~~~~~~~cpp
assert(document["i"].IsNumber());
// In this case, IsUint()/IsInt64()/IsUInt64() also return true.
// In this case, IsUint()/IsInt64()/IsUint64() also return true.
assert(document["i"].IsInt());
printf("i = %d\n", document["i"].GetInt());
// Alternative (int)document["i"]
......
......@@ -82,7 +82,7 @@ JSON Number 类型表示所有数值。然而,C++ 需要使用更专门的类
~~~~~~~~~~cpp
assert(document["i"].IsNumber());
// 在此情况下,IsUint()/IsInt64()/IsUInt64() 也会返回 true
// 在此情况下,IsUint()/IsInt64()/IsUint64() 也会返回 true
assert(document["i"].IsInt());
printf("i = %d\n", document["i"].GetInt());
// 另一种用法: (int)document["i"]
......
......@@ -57,7 +57,7 @@ int main(int, char*[]) {
printf("n = %s\n", document["n"].IsNull() ? "null" : "?");
assert(document["i"].IsNumber()); // Number is a JSON type, but C++ needs more specific type.
assert(document["i"].IsInt()); // In this case, IsUint()/IsInt64()/IsUInt64() also return true.
assert(document["i"].IsInt()); // In this case, IsUint()/IsInt64()/IsUint64() also return true.
printf("i = %d\n", document["i"].GetInt()); // Alternative (int)document["i"]
assert(document["pi"].IsNumber());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment