2 Star 2 Fork 9

王布衣/gox

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
serialization.go 662 Bytes
Copy Edit Raw Blame History
王布衣 authored 2025-09-14 21:47 +08:00 . 更新依赖库版本
// Copyright (c) 2015, Emir Pasic. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package arraystack
import (
"gitee.com/quant1x/gox/util/internal"
)
func assertSerializationImplementation() {
var _ internal.JSONSerializer = (*Stack)(nil)
var _ internal.JSONDeserializer = (*Stack)(nil)
}
// ToJSON outputs the JSON representation of the stack.
func (stack *Stack) ToJSON() ([]byte, error) {
return stack.list.ToJSON()
}
// FromJSON populates the stack from the input JSON representation.
func (stack *Stack) FromJSON(data []byte) error {
return stack.list.FromJSON(data)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/quant1x/gox.git
git@gitee.com:quant1x/gox.git
quant1x
gox
gox
v1.25.2

Search