PHPackages                             losthost/json-object - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. losthost/json-object

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

losthost/json-object
====================

Dynamic JSON object wrapper with snake\_case field access and Telegram-style getters

00PHP

Since Apr 19Pushed 1mo agoCompare

[ Source](https://github.com/Datahider/JsonObject)[ Packagist](https://packagist.org/packages/losthost/json-object)[ RSS](/packages/losthost-json-object/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

JsonObject
==========

[](#jsonobject)

Минимальная библиотека для динамической обертки над JSON-данными.

Идея:

- вход: JSON-строка или `stdClass`;
- доступ через Telegram-style геттеры вида `getMessageThreadId()`;
- поддержка `isBot()` и аналогичных булевых методов;
- автоматическое преобразование `PascalCase`/`camelCase` в `snake_case`;
- вложенные JSON-объекты автоматически заворачиваются в `JsonObject`;
- JSON-массивы остаются массивами, но их элементы-объекты тоже заворачиваются в `JsonObject`.

Текущее поведение:

- `getMessage()` ищет поле `message`;
- `getMessageThreadId()` ищет `message_thread_id`;
- `isBot()` ищет `is_bot`;
- если поля нет, возвращается `null`;
- scalar значения возвращаются как есть.

Пример:

```
use losthost\JsonObject\JsonObject;

$update = new JsonObject(getMessage()->getMessageThreadId(); // 20
$update->getMessage()->getChat()->getId(); // 9
$update->getMessage()->getChat()->getIsForum(); // true
$update->getMessage()->getFrom()->isBot(); // true
$update->getMessage()->getNoSuchField(); // null
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance59

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/493534?v=4)[pio](/maintainers/pio)[@pio](https://github.com/pio)

### Embed Badge

![Health badge](/badges/losthost-json-object/health.svg)

```
[![Health](https://phpackages.com/badges/losthost-json-object/health.svg)](https://phpackages.com/packages/losthost-json-object)
```

###  Alternatives

[jonaspardon/laravel-event-visualizer

Laravel package to visualize events with their handlers, including jobs to chain them together

2644.9k](/packages/jonaspardon-laravel-event-visualizer)

PHPackages © 2026

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