Documentation
¶
Index ¶
- Constants
- func ArrayToString(vals []Json) string
- func IsDiferent(a, b Json) bool
- func NotInSlice(la, lb []Json, key string) []string
- func Quote(val interface{}) any
- func SliceFindIndex(item Json, list []Json, key string) int
- func ToString(val interface{}) string
- func Unquote(val interface{}) any
- func Val(data Json, _default any, atribs ...string) any
- type Item
- func (it *Item) Any(_default any, atribs ...string) *generic.Any
- func (it *Item) Array(atrib string) []Json
- func (it *Item) ArrayStr(atrib string) []string
- func (it *Item) Bool(atribs ...string) bool
- func (it *Item) Data(atribs ...string) JsonD
- func (it *Item) Del(key string) bool
- func (it *Item) Get(key string) interface{}
- func (it *Item) Id() string
- func (it *Item) IdT() string
- func (it *Item) Index() int
- func (it *Item) Int(atribs ...string) int
- func (it *Item) IsDiferent(new Json) bool
- func (it *Item) Json(atribs ...string) Json
- func (it *Item) Key(atribs ...string) string
- func (it *Item) Lowcase(_default string, atribs ...string) string
- func (it *Item) Num(atribs ...string) float64
- func (it *Item) Scan(rows *sql.Rows) error
- func (it *Item) Set(key string, val any) bool
- func (it *Item) Str(atribs ...string) string
- func (it *Item) Time(atribs ...string) time.Time
- func (it *Item) Titlecase(_default string, atribs ...string) string
- func (it *Item) ToByte() []byte
- func (it *Item) ToJson() Json
- func (it *Item) ToScan(src interface{}) error
- func (it *Item) ToString() string
- func (it *Item) Uppcase(_default string, atribs ...string) string
- func (it *Item) ValAny(_default any, atribs ...string) any
- func (it *Item) ValBool(_default bool, atribs ...string) bool
- func (it *Item) ValInt(_default int, atribs ...string) int
- func (it *Item) ValJson(_default Json, atribs ...string) Json
- func (it *Item) ValNum(_default float64, atribs ...string) float64
- func (it *Item) ValStr(_default string, atribs ...string) string
- func (it *Item) ValTime(_default time.Time, atribs ...string) time.Time
- type Items
- func (it *Items) Bool(idx int, atribs ...string) bool
- func (it *Items) Del(idx int, key string) bool
- func (it *Items) Get(idx int, key string) interface{}
- func (it *Items) Id(idx int) string
- func (it *Items) IdT(idx int) string
- func (it *Items) Int(idx int, atribs ...string) int
- func (it *Items) Json(idx int, atribs ...string) Json
- func (it *Items) Key(idx int, atribs ...string) string
- func (it *Items) Lowcase(idx int, _default string, atribs ...string) string
- func (it *Items) Num(idx int, atribs ...string) float64
- func (it *Items) Scan(src interface{}) error
- func (it *Items) Set(idx int, key string, val interface{}) bool
- func (it *Items) Str(idx int, atribs ...string) string
- func (it *Items) Titlecase(idx int, _default string, atribs ...string) string
- func (it *Items) ToJson() Json
- func (it *Items) ToList(all, page, rows int) List
- func (it *Items) ToString() string
- func (it *Items) Uppcase(idx int, _default string, atribs ...string) string
- func (it *Items) ValAny(idx int, _default any, atribs ...string) any
- func (it *Items) ValStr(idx int, _default string, atribs ...string) string
- type Json
- func ApendJson(m Json, n Json) Json
- func Append(a, b Json) (Json, bool)
- func ByteToJson(scr interface{}) Json
- func Chage(a, b Json) (Json, bool)
- func JsonToArrayJson(src map[string]interface{}) ([]Json, error)
- func Marshal(src interface{}) (Json, error)
- func Merge(a, b Json) (Json, bool)
- func OkOrNotJson(condition bool, ok Json, not Json) Json
- func ToJson(src interface{}) (Json, error)
- func ToJsonArray(vals []interface{}) ([]Json, error)
- func ToUnit8Json(src interface{}) Json
- func (s Json) Any(_default any, atribs ...string) *generic.Any
- func (s Json) Append(obj Json) (*Json, bool)
- func (s Json) Array(atrib string) []Json
- func (s Json) ArrayAny(atrib string) []any
- func (s Json) ArrayStr(atrib string) []string
- func (s Json) Bool(atribs ...string) bool
- func (s Json) Chage(obj Json) (*Json, bool)
- func (s Json) Clone() Json
- func (s Json) Data(atrib ...string) JsonD
- func (s Json) Del(key string) bool
- func (s Json) Emptyt() bool
- func (s Json) ExistKey(key string) bool
- func (s Json) Get(key string) interface{}
- func (s Json) Id() string
- func (s Json) IdT() string
- func (s Json) Index() int
- func (s Json) Int(atribs ...string) int
- func (s Json) IsDiferent(new Json) bool
- func (s Json) Json(atrib string) Json
- func (s Json) Key(atribs ...string) string
- func (s Json) Merge(obj Json) (*Json, bool)
- func (s Json) Num(atribs ...string) float64
- func (s *Json) Scan(src interface{}) error
- func (s Json) Set(key string, val interface{}) bool
- func (s Json) Str(atribs ...string) string
- func (s Json) Time(atribs ...string) time.Time
- func (s Json) ToByte() []byte
- func (s Json) ToItem(src interface{}) Item
- func (s Json) ToQuote() string
- func (s *Json) ToScan(src interface{}) error
- func (s Json) ToString() string
- func (s Json) ToUnquote() string
- func (s Json) Update(fromJson Json) error
- func (s Json) ValAny(_default any, atribs ...string) any
- func (s Json) ValBool(_default bool, atribs ...string) bool
- func (s Json) ValInt(_default int, atribs ...string) int
- func (s Json) ValJson(_default Json, atribs ...string) Json
- func (s Json) ValNum(_default float64, atribs ...string) float64
- func (s Json) ValStr(_default string, atribs ...string) string
- func (s Json) ValTime(_default time.Time, atribs ...string) time.Time
- func (s Json) Value() (driver.Value, error)
- type JsonD
- type List
Constants ¶
const TpArray = 2
const TpObject = 1
TpObject and TpArray type
Variables ¶
This section is empty.
Functions ¶
func ArrayToString ¶ added in v0.0.2
ArrayToJson convert a []interface{} to a Json
func IsDiferent ¶ added in v0.0.2
IsDiferent compare two Json and return true if they are different
func NotInSlice ¶ added in v0.0.2
InSlice return the items that are in the slice
func SliceFindIndex ¶ added in v0.0.2
SliceFindIndex find the index of an item in a slice
func ToString ¶ added in v0.0.2
func ToString(val interface{}) string
ToString convert a value to a string
Types ¶
type Item ¶
Item struct to define a item
func (*Item) IsDiferent ¶ added in v0.0.2
IsDiferent compare two items
type Items ¶
Items struct to define a items
type Json ¶
type Json map[string]interface{}
Json type
func ByteToJson ¶ added in v0.0.2
func ByteToJson(scr interface{}) Json
ByteToJson convert a byte to a Json
func JsonToArrayJson ¶ added in v0.0.2
JsonToArrayJson convert a map to a json array
func OkOrNotJson ¶ added in v0.0.2
OkOrNotJson return a Json depending on a condition
func ToJsonArray ¶ added in v0.0.2
ToJsonArray convert a value to a []Json
func ToUnit8Json ¶ added in v0.0.2
func ToUnit8Json(src interface{}) Json
ToUnit8Json convert a value to a Json
func (Json) Chage ¶ added in v0.0.2
Cange s json with a other json and return the change and is changed a json
func (Json) IsDiferent ¶ added in v0.0.2
IsDiferent compare two json
type JsonD ¶ added in v0.0.2
type JsonD struct {
Type int
Value interface{}
}
JsonD struct to define a json data