Files
formipay/node_modules/flatted/golang
dwindown e8fbfb14c1 fix: prevent asset conflicts between React and Grid.js versions
Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 17:02:14 +07:00
..

flatted (Go)

A super light and fast circular JSON parser.

Usage

package main

import (
	"fmt"
	"github.com/WebReflection/flatted/golang/pkg/flatted"
)

type Group struct {
	Name string `json:"name"`
}

type User struct {
	Name   string `json:"name"`
	Friend *User  `json:"friend"`
	Group  *Group `json:"group"`
}

func main() {
	group := &Group{Name: "Developers"}
	alice := &User{Name: "Alice", Group: group}
	bob := &User{Name: "Bob", Group: group}

	alice.Friend = bob
	bob.Friend = alice // Circular reference

	// Stringify Alice
	s, _ := flatted.Stringify(alice)
	fmt.Println(s)
	// Output: [{"name":"Alice","friend":"1","group":"2"},{"name":"Bob","friend":"0","group":"2"},{"name":"Developers"}]

	// Flattening in action:
	// Index "0" is Alice, Index "1" is Bob, Index "2" is the shared Group.

	// Parse back into a generic map structure
	res, _ := flatted.Parse(s)
	aliceMap := res.(map[string]any)
	fmt.Println(aliceMap["name"]) // Alice
}

CLI

Build the binary using the provided Makefile:

make build

Then use it to parse flatted JSON from stdin:

echo '[{"a":"1"},"b"]' | ./flatted