Skip to content

Commit

Permalink
fix typo in docs (#3207)
Browse files Browse the repository at this point in the history
* Update README.md

* Update README_EN.md

* Update index.md

* Update kotlin_cn.md

* Update kotlin_en.md
  • Loading branch information
imba-tjd authored Dec 14, 2024
1 parent 69acc7b commit 3f5df1b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ byte[] text = JSON.toJSONBytes(data);
import com.alibaba.fastjson2.*

val data = ... // Any
val text = text.toJSONString() // String
val bytes = text.toJSONByteArray() // ByteArray
val text = data.toJSONString() // String
val bytes = data.toJSONByteArray() // ByteArray
```

### 2.5 使用`JSONObject``JSONArray`
Expand Down
4 changes: 2 additions & 2 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ byte[] text = JSON.toJSONBytes(data);
import com.alibaba.fastjson2.*

val data = ... // Any
val text = text.toJSONString() // String
val bytes = text.toJSONByteArray() // ByteArray
val text = data.toJSONString() // String
val bytes = data.toJSONByteArray() // ByteArray
```

### 2.5 Use `JSONObject`, `JSONArray`
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ byte[] text = JSON.toJSONBytes(data);
import com.alibaba.fastjson2.*

val data = ... // Any
val text = text.toJSONString() // String
val bytes = text.toJSONByteArray() // ByteArray
val text = data.toJSONString() // String
val bytes = data.toJSONByteArray() // ByteArray
```

### 2.5 使用`JSONObject``JSONArray`
Expand Down
4 changes: 2 additions & 2 deletions docs/kotlin_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ val data = text.into<Map<String, User>>() // Map<String, User>

```kotlin
val data = "..." // Any
val text = text.toJSONString() // String
val text = data.toJSONString() // String
```

序列化为字节数组:

```kotlin
val data = "..." // Any
val bytes = text.toJSONByteArray() // ByteArray
val bytes = data.toJSONByteArray() // ByteArray
```

### 2.5 使用`JSONObject``JSONArray`
Expand Down
4 changes: 2 additions & 2 deletions docs/kotlin_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ Serialization as a string:

```kotlin
val data = "..." // Any
val text = text.toJSONString() // String
val text = data.toJSONString() // String
```

Serialization as a ByteArray:

```kotlin
val data = "..." // Any
val bytes = text.toJSONByteArray() // ByteArray
val bytes = data.toJSONByteArray() // ByteArray
```

### 2.5 Use `JSONObject``JSONArray`
Expand Down

0 comments on commit 3f5df1b

Please sign in to comment.