mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-06-26 01:15:38 +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
|
||
|
}
|