You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.5 KiB

// ------------------------------------------------------------------------
// Project atila
// Active Thing (activething.com) git.activething.com/go
//
// File name list_packer.go
// Created by DEV
// Modified 23/01/2024
//
// Copyright 2024 activething.com
// ------------------------------------------------------------------------
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ------------------------------------------------------------------------
package pjson
import (
"activething.com/go/gogo/packets"
"time"
)
func (p *Packer) Item (value any) { p.addSep().Pack(value) }
func (p *Packer) ItemRaw (value []byte) { p.addSep().PackRaw(value) }
func (p *Packer) ItemBinary (value []byte) { p.addSep().PackBinary(value) }
func (p *Packer) ItemString (value string) { p.addSep().PackString(value) }
func (p *Packer) ItemBool (value bool) { p.addSep().PackBool(value) }
func (p *Packer) ItemInt8 (value int8) { p.addSep().PackInt64(int64(value)) }
func (p *Packer) ItemInt16 (value int16) { p.addSep().PackInt64(int64(value)) }
func (p *Packer) ItemInt32 (value int32) { p.addSep().PackInt64(int64(value)) }
func (p *Packer) ItemInt64 (value int64) { p.addSep().PackInt64(value) }
func (p *Packer) ItemUInt8 (value uint8) { p.addSep().PackUInt64(uint64(value)) }
func (p *Packer) ItemUInt16 (value uint16) { p.addSep().PackUInt64(uint64(value)) }
func (p *Packer) ItemUInt32 (value uint32) { p.addSep().PackUInt64(uint64(value)) }
func (p *Packer) ItemUInt64 (value uint64) { p.addSep().PackUInt64(value) }
func (p *Packer) ItemFloat32 (value float32) { p.addSep().PackFloat64(float64(value))}
func (p *Packer) ItemFloat64 (value float64) { p.addSep().PackFloat64(value) }
func (p *Packer) ItemDate (value time.Time) { p.addSep().PackDate(value) }
func (p *Packer) ItemList (builder func(packer packs.ListPacker)) { p.addSep().ItemList (builder) }
func (p *Packer) ItemMap (builder func(packer packs.MapPacker )) { p.addSep().ItemMap (builder) }
func (p *Packer) ItemObject(builder func(packer packs.ObjectPacker)) { p.addSep().ItemObject(builder) }

Powered by TurnKey Linux.