mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-07-26 18:30:15 +00:00
17 lines
296 B
Go
17 lines
296 B
Go
![]() |
// +build json
|
||
|
|
||
|
package net
|
||
|
|
||
|
import (
|
||
|
serialjson "github.com/v2ray/v2ray-core/common/serial/json"
|
||
|
)
|
||
|
|
||
|
func (this *NetworkList) UnmarshalJSON(data []byte) error {
|
||
|
strlist, err := serialjson.UnmarshalStringList(data)
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
*this = NewNetworkList(strlist)
|
||
|
return nil
|
||
|
}
|