0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-10 23:32:51 +02:00
gitea/modules/json/jsonlegacy.go
TheFox0x7 ff777cd2ad
Add terraform state registry (#36710)
Adds terraform/opentofu state registry with locking. Implements: https://github.com/go-gitea/gitea/issues/33644. I also checked [encrypted state](https://opentofu.org/docs/language/state/encryption), it works out of the box.

Docs PR: https://gitea.com/gitea/docs/pulls/357

---------

Co-authored-by: Andras Elso <elso.andras@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-06 13:41:17 -07:00

26 lines
470 B
Go

// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
//go:build !goexperiment.jsonv2
package json
import (
"encoding/json"
"io"
)
func getDefaultJSONHandler() Interface {
return jsonGoccy{}
}
func MarshalKeepOptionalEmpty(v any) ([]byte, error) {
return DefaultJSONHandler.Marshal(v)
}
func NewDecoderCaseInsensitive(reader io.Reader) Decoder {
return DefaultJSONHandler.NewDecoder(reader)
}
type Value = json.RawMessage