fix: adjust Dns_Tbl parser
With firmware 3.0.41-IMS-KDG the `Dns_Tbl` format changed:
```json
{
"Dns_Tbl": [{
"__id": "1",
"dns": "83.169.186.33",
"Type": "DHCPv4"
},
{
"__id": "2",
"dns": "83.169.186.97",
"Type": "DHCPv4"
}
]
}
```
This commit is contained in:
parent
5285dddf4b
commit
6416edb90c
1 changed files with 47 additions and 41 deletions
|
|
@ -102,6 +102,12 @@ type StationStatusReponse struct {
|
|||
Data *StationStatusData `json:"data"`
|
||||
}
|
||||
|
||||
type DNSTable struct {
|
||||
Id string `json:"__id"`
|
||||
Type string `json:"Type"`
|
||||
Dns string `json:"dns"`
|
||||
}
|
||||
|
||||
type StationStatusData struct {
|
||||
DateAndTime string `json:"dateandtime"`
|
||||
FirewallStatus string `json:"firewallstatus"`
|
||||
|
|
@ -139,7 +145,7 @@ type StationStatusData struct {
|
|||
HardwareType string `json:"hardwaretype"`
|
||||
Uptime string `json:"uptime"`
|
||||
InternetIpv4 string `json:"internetipv4"`
|
||||
DnsTbl []string `json:"Dns_Tbl"`
|
||||
DnsTbl []DNSTable `json:"Dns_Tbl"`
|
||||
DelegatedPrefix string `json:"DelegatedPrefix"`
|
||||
DNSTblRT []string `json:"DNSTblRT"`
|
||||
IPAddressRT []string `json:"IPAddressRT"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue