PHPackages                             indigoviking/jsond - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. indigoviking/jsond

ActiveCraft-plugin[Templating &amp; Views](/categories/templating)

indigoviking/jsond
==================

Adds Twig filters for working with json.

1.05(7y ago)13.7k1[1 issues](https://github.com/IndigoViking/Jsond/issues)MITPHP

Since Dec 17Pushed 7y agoCompare

[ Source](https://github.com/IndigoViking/Jsond)[ Packagist](https://packagist.org/packages/indigoviking/jsond)[ RSS](/packages/indigoviking-jsond/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Json'd plugin for Craft CMS 3.x
===============================

[](#jsond-plugin-for-craft-cms-3x)

Adds Twig filters for working with json.

[![Screenshot](resources/img/plugin-logo.png)](resources/img/plugin-logo.png)

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require indigoviking/jsond

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Json'd.

Json'd Overview
---------------

[](#jsond-overview)

Json'd adds 3 twig filters: |json\_decoded , |json\_last\_error , and |json\_last\_error\_msg .

Using Json'd
------------

[](#using-jsond)

### json\_decoded

[](#json_decoded)

Pass a json string to |json\_decoded and it will return an object.

`{{ entry.jsonField|json_decoded }}`

To return an array instead of an object, pass a parameter of 'true'.

`{{ entry.jsonField|json_decoded('true') }}`

|json\_decoded accepts all of the parameters that the json\_decoded function in PHP accepts.

`{{ entry.jsonField|json_decoded('object/associative', 'depth', 'option') }}`

Object/associative is set to false by default returning an object. Depth (passed as an integer), sets the depth to which the json is decoded. Default recursion depth in PHP is 512. Options available are: JSON\_BIGINT\_AS\_STRING - Decodes large integers as their original string value. JSON\_OBJECT\_AS\_ARRAY - Decodes as array. Default of |json\_decoded. JSON\_THROW\_ON\_ERROR - Throws JsonException if an error occurs instead of setting the global error state that is retrieved with json\_last\_error().

### json\_last\_error\_msg

[](#json_last_error_msg)

Returns the error string of json\_decoded.

`{{ entry.jsonField|json_last_error_msg }}`

Accepts 'encode' as a parameter to return the error string of json\_encode.

`{{ entry.jsonField|json_last_error_msg('encode') }}`

### json\_last\_error

[](#json_last_error)

Returns the last error of json\_decoded.

`{{ entry.jsonField|json_last_error }}`

Accepts 'encode' as a parameter to return the last error of json\_encode.

`{{ entry.jsonField|json_last_error('encode') }}`

PHP Documentation
-----------------

[](#php-documentation)

To read the full documentation of the PHP functions and their accepted parameters and return values, see these links:

[json\_decoded](http://php.net/manual/en/function.json-decode.php)[json\_last\_error\_msg](http://php.net/manual/en/function.json-last-error-msg.php)[json\_last\_error](http://php.net/manual/en/function.json-last-error.php)

Brought to you by [The Indigo Viking](https://www.theindigoviking.com)

###  Health Score

27

—

LowBetter than 46% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Total

4

Last Release

2761d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca21e3417b5626bc86ca5c34f2bbb642875e51c997a92a0935f3a7561ad34311?d=identicon)[IndigoViking](/maintainers/IndigoViking)

---

Top Contributors

[![IndigoViking](https://avatars.githubusercontent.com/u/37722046?v=4)](https://github.com/IndigoViking "IndigoViking (9 commits)")

---

Tags

cmsCraftcraftcmscraft-pluginjsond

### Embed Badge

![Health badge](/badges/indigoviking-jsond/health.svg)

```
[![Health](https://phpackages.com/badges/indigoviking-jsond/health.svg)](https://phpackages.com/packages/indigoviking-jsond)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

101400.6k78](/packages/verbb-formie)[mmikkel/retcon

Powerful Twig filters for mutating and querying HTML

80187.1k12](/packages/mmikkel-retcon)[verbb/hyper

A user-friendly links field for Craft.

24153.5k14](/packages/verbb-hyper)[verbb/vizy

A flexible visual editor field for Craft.

4251.5k1](/packages/verbb-vizy)[wbrowar/guide

A CMS Guide for Craft CMS.

6154.7k1](/packages/wbrowar-guide)[verbb/events

A full-featured plugin for event management and ticketing.

2312.1k](/packages/verbb-events)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
