Beispiel #1
0
func main() {
	jm := jsnm.FileNameFmt("city.md")
	provinces := jm.Get("p").Arr()
	cities := jm.Get("c").Arr()
	for i, it := range provinces {
		fmt.Printf("***** %dth: %v\n", i, it.RawData().String())
		ccs := cities[i].Arr()
		for i, it := range ccs {
			fmt.Printf("%dth: %v\t", i, it.RawData().String())
		}
		fmt.Println()
	}

	code_jm := jsnm.FileNameFmt("code.md")
	bjc := code_jm.Get("北京").RawData().String()
	fmt.Printf("Beijing's code:%s\n", bjc)
}
Beispiel #2
0
func main() {
	// TestJson()
	jm := jsnm.FileNameFmt("site.md")
	arr := jm.Arr()
	for i, it := range arr {
		fmt.Print(i)
		parseURI(it.RawData().String())
	}
	t := 1
	for k, v := range mp {
		fmt.Println(t)
		t++
		fmt.Println(k)
		fmt.Println(v)
		fmt.Println()
	}
}