| 1 | import x.json2 |
| 2 | |
| 3 | pub struct AppJsonValue { |
| 4 | pub: |
| 5 | file string |
| 6 | md5 string |
| 7 | creat i64 |
| 8 | } |
| 9 | |
| 10 | pub type AppJson = map[string]AppJsonValue |
| 11 | |
| 12 | fn test_main() { |
| 13 | app_json1 := map[string]AppJsonValue{} |
| 14 | res1 := json2.encode(app_json1) |
| 15 | assert '${res1}' == '{}' |
| 16 | |
| 17 | app_json2 := AppJson{} |
| 18 | res2 := json2.encode(app_json2) |
| 19 | assert '${res2}' == '{}' |
| 20 | } |
| 21 |