Weave Code
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

Json2 Bundle Laravel Package

bmatzner/json2-bundle

Symfony2 bundle that packages Douglas Crockford’s JSON-js (json2.js, 2013-05-26) for easy inclusion via Composer and asset installation. Provides json2.min.js in your public assets so you can reference it in templates.

View on GitHub
Deep Wiki
Context7

JSON-js Bundle for Symfony2

Current Version

JSON-js 2013-05-26 Only the json2.js file crockford is suggesting to use is included

Installation

Add bundle to your composer.json file

// composer.json

{
    "require": {
		// ...
        "bmatzner/json2-bundle": "*"
    }
}

Add bundle to your application kernel

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Bmatzner\Json2Bundle\BmatznerJson2Bundle(),
        // ...
    );
}

Download the bundle using Composer

$ php composer.phar update bmatzner/json2-bundle

Install assets

Given your server's public directory is named "web", install the public vendor resources

$ php app/console assets:install web

Optionally, use the --symlink attribute to create links rather than copies of the resources

$ php app/console assets:install --symlink web

Usage

Refer to the desired files in your HTML template, e.g.

<script type="text/javascript" src="{{ asset('bundles/bmatznerjson2/js/json2.min.js') }}"></script>

Licenses

Refer to the source code of the included files for license information

References

  1. https://github.com/douglascrockford/JSON-js
  2. http://symfony.com
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.
datacore/hub-sdk
alengo/sulu-http-cache-bundle
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable
irajul/filament-shadcn-theme
agtp/agtp-php
agtp/mod-php
centraldesktop/protobuf-php
trappistes/laravel-custom-fields
splash/sonata-admin
splash/metadata