Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Jsonrecast Laravel Package

boundwize/jsonrecast

JsonRecast is an editable JSON AST for PHP with visitor traversal and formatting-preserving printing. Update JSON content programmatically while keeping indentation, spacing, and key order intact, so output differs only where you made changes—ideal for composer.json and config files.

View on GitHub
Deep Wiki
Context7
1.0.37

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.36...1.0.37

1.0.36

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.35...1.0.36

1.0.35

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.34...1.0.35

1.0.34

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.33...1.0.34

1.0.33

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.32...1.0.33

1.0.32

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.31...1.0.32

1.0.31

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.30...1.0.31

1.0.30

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.29...1.0.30

1.0.29

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.28...1.0.29

1.0.28

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.27...1.0.28

1.0.27

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.26...1.0.27

1.0.26

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.25...1.0.26

1.0.25

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.24...1.0.25

1.0.24

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.23...1.0.24

1.0.23

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.22...1.0.23

1.0.22

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.21...1.0.22

1.0.21

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.20...1.0.21

1.0.20

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.19...1.0.20

1.0.19

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.18...1.0.19

1.0.18

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.17...1.0.18

1.0.17

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.16...1.0.17

1.0.16

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.15...1.0.16

1.0.15

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.14...1.0.15

1.0.14

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.13...1.0.14

1.0.13

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.12...1.0.13

1.0.12

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.11...1.0.12

1.0.11

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.10...1.0.11

1.0.10

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.9...1.0.10

1.0.9

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.8...1.0.9

1.0.8

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.7...1.0.8

1.0.7

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.6...1.0.7

1.0.6

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.5...1.0.6

1.0.5

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.4...1.0.5

1.0.4

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.3...1.0.4

1.0.3

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.2...1.0.3

1.0.2

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.1...1.0.2

1.0.1

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/1.0.0...1.0.1

1.0.0

ci build PHPStan

After 100 iterative releases, I’m proud to release JsonRecast 1.0.0, the first stable release! 🎉

Read documentation to get started https://boundwize.github.io/jsonrecast/

Enjoy! 😉

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.19...1.0.0

0.4.19

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.18...0.4.19

0.4.18

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.17...0.4.18

0.4.17

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.16...0.4.17

0.4.16

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.15...0.4.16

0.4.15

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.14...0.4.15

0.4.14

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.13...0.4.14

0.4.13

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.12...0.4.13

0.4.12

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.11...0.4.12

0.4.11

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.10...0.4.11

0.4.10

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.9...0.4.10

0.4.9

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.8...0.4.9

0.4.8

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.7...0.4.8

0.4.7

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.6...0.4.7

0.4.6

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.5...0.4.6

0.4.5

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.4...0.4.5

0.4.3

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.2...0.4.3

0.4.2

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.1...0.4.2

0.4.1

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.4.0...0.4.1

0.4.0

ci build PHPStan

This release introduces NodeJsonFinder, a read-only query helper mirroring PHP-Parser's NodeFinder.

For example, use of the find:

$document = JsonRecast::parse(<<<'JSON'
{
    "repositories": [
        {"type": "composer", "url": "http://repo.internal.example/"},
        {"type": "vcs", "url": "https://github.com/acme/lib"}
    ]
}
JSON);

From the $document object, you can resolve the matching nodes, eg:

$finder = new NodeJsonFinder();
$insecureNodes = $finder->find(
    $document,
    static fn (NodeJson $node, NodeJsonPath $path): bool =>
        $node instanceof StringNode
        && str_starts_with($node->value, 'http://'),
);

// $insecureNodes:
// [
//     StringNode { value: 'http://repo.internal.example/' },
// ]

You can also find with extracted nodes data: found nodes do not record their own paths, so when the report should also say where each problem is, extract it in the filter as it arrives:

$insecure = [];
$finder = new NodeJsonFinder();

$finder->find(
    $document,
    static function (NodeJson $node, NodeJsonPath $path) use (&$insecure): bool {
        if ($node instanceof StringNode && str_starts_with($node->value, 'http://')) {
            $insecure[] = [
                'value'     => $node->value,
                'path_info' => array_map(
                    static fn ($segment) => $segment->value, $path->segments()
                ),
            ];

            return true;
        }

        return false;
    },
);

// $insecure:
// [
//     [
//         'value'     => 'http://repo.internal.example/',
//         'path_info' => ['repositories', 0, 'url'],
//     ],
// ]

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.3.44...0.4.0

0.3.44

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.3.43...0.3.44

0.3.43

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.3.42...0.3.43

0.3.42

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.3.41...0.3.42

0.3.41

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.3.40...0.3.41

0.3.40

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.3.39...0.3.40

0.3.39

ci build PHPStan

What's Changed

Full Changelog: https://github.com/boundwize/jsonrecast/compare/0.3.38...0.3.39

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console