Documentation ¶
Index ¶
- func GetJsonLeavesPath(fieldDetailsSlice []FieldDetails) []string
- func GetJsonNodesLevel(fieldDetailsSlice []FieldDetails) int
- func GetJsonNodesPath(fieldDetailsSlice []FieldDetails) []string
- func TraverseFields(c chan FieldDetails, subPath []string, value interface{}, wg *sync.WaitGroup)
- type FieldDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetJsonLeavesPath ¶
func GetJsonLeavesPath(fieldDetailsSlice []FieldDetails) []string
to get all the leaves, including the blank slice [], blank map {}
func GetJsonNodesLevel ¶
func GetJsonNodesLevel(fieldDetailsSlice []FieldDetails) int
func GetJsonNodesPath ¶
func GetJsonNodesPath(fieldDetailsSlice []FieldDetails) []string
func TraverseFields ¶
func TraverseFields(c chan FieldDetails, subPath []string, value interface{}, wg *sync.WaitGroup)
Note: some issues exposed: 1. all Json numbers's type is marked as float64, can not distinguish int with float64 2. if Json number is 1234.00, then the value in Go is 1234 once json.Unmarshal, lost the .00 3. as Json mumbers are treated as float64, it may result in some issue, like use sci a.xxxe+1yy to represent timestamp
Types ¶
type FieldDetails ¶
type FieldDetails struct { FieldPath []string CurrValue interface{} FieldType string // the json supported types FieldSubType string // like ip/email/phone/etc. }
func GetFieldsDetails ¶
func GetFieldsDetails(valueSource interface{}) []FieldDetails
func GetJsonLeaves ¶
func GetJsonLeaves(fieldDetailsSlice []FieldDetails) []FieldDetails
to get all the leaves, including the blank slice [], blank map {}
Click to show internal directories.
Click to hide internal directories.