广告平台(站长使用)
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

json.go 245 B

1 개월 전
1234567891011121314151617
  1. package utils
  2. import (
  3. "bytes"
  4. "encoding/json"
  5. )
  6. func JsonMarshal(interface{}) {
  7. }
  8. // 不科学计数法
  9. func JsonDecode(data []byte, v interface{}) error {
  10. d := json.NewDecoder(bytes.NewReader(data))
  11. d.UseNumber()
  12. return d.Decode(v)
  13. }