PHPackages                             kupodigital/ldjson - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. kupodigital/ldjson

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

kupodigital/ldjson
==================

LightweightDataJson - A lightweight utility for encoding and decoding data in the .ld-json format.

v1.1.0(1mo ago)227MITPHPPHP &gt;=8.0

Since Aug 4Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/kupodigital/ldjson)[ Packagist](https://packagist.org/packages/kupodigital/ldjson)[ RSS](/packages/kupodigital-ldjson/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (2)Versions (6)Used By (0)

Lightweight Data Json (LD-JSON) Format
======================================

[](#lightweight-data-json-ld-json-format)

Purpose
-------

[](#purpose)

The Lightweight Data Json (LD-JSON) format was developed with the aim of providing a lighter alternative to the conventional JSON format. It seeks to address the issue of key repetition in each object, making the data structure more compact and storage-efficient. By eliminating the need to repeat keys in each object, LD-JSON is especially suitable for scenarios where space-saving is crucial.

Usage
-----

[](#usage)

The LD-JSON format can be used similarly to CSV or TSV files, with the added advantage of including a header that indicates the type of each value present in the objects. This facilitates data interpretation and helps ensure data integrity.

The basic syntax of LD-JSON involves a header that defines data types, followed by data objects, each representing a set of related values. Data types are indicated in the header after the ":" symbol.

Examples
--------

[](#examples)

Here are examples of data before and after being encoded in the LD-JSON format:

### Original Data

[](#original-data)

```
$data = [
  [
    "name" => "Asana",
    "type" => "productivity",
    "url" => "https://developers.asana.com/docs",
    "price" => 0,
    "authentication" => "oauth"
  ],
  [
    "name" => "ClickUp",
    "type" => "productivity",
    "url" => "https://clickup.com/api/",
    "price" => 0,
    "authentication" => "oauth"
  ],
  [
    "name" => "Atlassian",
    "type" => "productivity",
    "url" => "https://developer.atlassian.com/server/jira/platform/rest-apis/",
    "price" => 0,
    "authentication" => "oauth;basic"
  ],
  ...
];
```

### Data Encoded in LD-JSON

[](#data-encoded-in-ld-json)

```
{	name:string	type:string	url:string	price:integer	authentication:string	}
{	Asana	productivity	https://developers.asana.com/docs	0	oauth	}
{	ClickUp	productivity	https://clickup.com/api/	0	oauth	}
{	Atlassian	productivity	https://developer.atlassian.com/server/jira/platform/rest-apis/	0	oauth;basic	}
...

```

We hope that LD-JSON proves to be useful for your data storage and transfer needs in an efficient manner. Feel free to contribute, modify, and use as per your specific requirements.

License
-------

[](#license)

This format follows the terms of the MIT License. The MIT License is permissive and allows for use, modification, and redistribution of the software, subject to certain conditions. It's important to note that the license includes a disclaimer, stating that the software is provided "as is," without warranties of any kind. Furthermore, the license limits the liability of the author or copyright holder for any damages arising from the use of the software.

This project is licensed under the MIT License - see the LICENSE file for details.

Please feel free to customize and adjust the content as needed to meet your specifications. Also, make sure to add the corresponding `LICENSE` file to your repository.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance89

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.2% 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 ~1005 days

Total

2

Last Release

57d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/66060?v=4)[Weslley Alves](/maintainers/wezoalves)[@wezoalves](https://github.com/wezoalves)

---

Top Contributors

[![wezoalves](https://avatars.githubusercontent.com/u/66060?v=4)](https://github.com/wezoalves "wezoalves (13 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (5 commits)")

---

Tags

csvdataformattersjsonphptsv

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/kupodigital-ldjson/health.svg)

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

###  Alternatives

[tarfin-labs/easy-pdf

Makes pdf processing easy.

1719.9k](/packages/tarfin-labs-easy-pdf)

PHPackages © 2026

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