mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
This commit is contained in:
parent
c004d0c899
commit
acf6b344f7
99 changed files with 681 additions and 655 deletions
|
@ -46,4 +46,4 @@ fn main() {
|
|||
println('JSON encoding of employee y: ${ss}')
|
||||
assert ss == s
|
||||
}
|
||||
```
|
||||
```
|
|
@ -15,8 +15,8 @@ fn test_json_encode_with_ptr() {
|
|||
name: 'foo'
|
||||
}
|
||||
data := MyStruct{
|
||||
user: &user
|
||||
users: {
|
||||
user: &user
|
||||
users: {
|
||||
'keyfoo': user
|
||||
}
|
||||
users2: {
|
||||
|
|
|
@ -273,7 +273,7 @@ fn test_nested_type() {
|
|||
cities: [City{'Donlon'}, City{'Termanches'}]
|
||||
},
|
||||
]
|
||||
users: {
|
||||
users: {
|
||||
'Foo': User{
|
||||
age: 10
|
||||
nums: [1, 2, 3]
|
||||
|
@ -291,7 +291,7 @@ fn test_nested_type() {
|
|||
pets: 'little boo'
|
||||
}
|
||||
}
|
||||
extra: {
|
||||
extra: {
|
||||
'2': {
|
||||
'n1': 2
|
||||
'n2': 4
|
||||
|
@ -527,7 +527,7 @@ fn test_encoding_struct_with_pointers() {
|
|||
association: &Association{
|
||||
price: APrice{}
|
||||
}
|
||||
price: APrice{}
|
||||
price: APrice{}
|
||||
}
|
||||
assert json.encode(value) == '{"association":{"price":{}},"price":{}}'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue