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
Kiota Serialization Json

Kiota Serialization Json Laravel Package

microsoft/kiota-serialization-json

JSON serialization library for PHP from Microsoft's Kiota toolchain. Lets Kiota-generated API clients parse and serialize JSON payloads. Install via Composer with microsoft/kiota-serialization-json.

View on GitHub
Deep Wiki
Context7

Kiota JSON serialization implementation for PHP

Frequently asked questions about Kiota Serialization Json
What is microsoft/kiota-serialization-json used for in Laravel?
It is the JSON serialization implementation that Kiota-generated PHP clients use to parse HTTP JSON responses into typed models and serialize request bodies. It implements the ParseNode and SerializationWriter contracts from microsoft/kiota-abstractions, so it has no role in a Laravel app unless you are generating a client with the Kiota CLI. For ordinary JSON handling, Laravel's HTTP client and JsonResource are simpler choices.
How do I install microsoft/kiota-serialization-json in a Laravel app?
Run composer require microsoft/kiota-serialization-json; version 2.x requires PHP 8.2 or newer. You then pass it into the generated Kiota client, alongside a Kiota HTTP request adapter and an authentication provider. There is no Laravel service provider or configuration file to publish.
Does microsoft/kiota-serialization-json support Laravel 10, 11, or 12?
The package is framework-agnostic, so it does not declare a Laravel version constraint and works with any Laravel release that runs on PHP 8.2 or newer. Laravel applications still on PHP 8.0 or 8.1 cannot use the 2.x line and would be stuck on the frozen 1.x line. Confirm your deployment PHP baseline before adopting it.
Do I need Kiota-generated code to use microsoft/kiota-serialization-json?
Yes, it is only useful with code generated by the Kiota CLI from an OpenAPI description. The generated client consumes this serializer through the Kiota abstractions contracts, and it also needs a compatible HTTP adapter and auth provider. Without generated Kiota code, use Laravel's HTTP client, JsonResource, or Saloon instead.
Can I use microsoft/kiota-serialization-json without Kiota abstractions or an HTTP adapter?
No, this package does not send HTTP requests or authenticate them; it only parses and writes JSON for the generated client. You must wire a Kiota HTTP request adapter and an access-token provider yourself, including token caching and refresh behavior. Keep that infrastructure behind a hand-written gateway or repository class rather than leaking Kiota types into controllers and jobs.
How do I test a Kiota client using this serialization library in Laravel?
You cannot rely on Http::fake because the Kiota client uses its own Guzzle-based adapter rather than Laravel's HTTP client. Mock the generated client behind your own gateway interface, or use a fake Kiota request adapter or ParseNode test double at the boundary. That keeps tests fast and avoids asserting against generated serialization internals.
What PHP and Laravel versions does microsoft/kiota-serialization-json require?
Version 2.0.0 of microsoft/kiota-serialization-json dropped PHP 7.2 through 8.1 and requires PHP 8.2 or newer. The package itself is not tied to a Laravel major version, so the real constraint is your PHP runtime. The 1.x line will not receive fixes, so older PHP estates should treat it as frozen.
Is microsoft/kiota-serialization-json a replacement for Laravel's HTTP client or JsonResource?
No, it is not a general replacement for Laravel's HTTP client, JsonResource, or packages like Saloon. Those tools offer better Laravel ergonomics, testing helpers, and retry behavior for hand-written integrations. Use this package only when you are adopting a Kiota-generated client, and check whether the official Microsoft Graph PHP SDK already covers your target API.
What are the production risks of using microsoft/kiota-serialization-json?
The changelog shows a history of edge-case fixes around DateTime handling, binary streams, escaping, float coercion, composed types, and nulls in collections, so regression risk on upgrade is real. Kiota PHP libraries also version-bump together, meaning a patch here can force coordinated updates to abstractions, the HTTP adapter, and generated code. The repository is a release-only mirror, so fixes are upstream-gated through microsoft/kiota-php with no commercial SLA.
Where do I report bugs or contribute to microsoft/kiota-serialization-json?
Report issues and pull requests against the microsoft/kiota-php monorepo, not this release-only mirror. Expect limited community coverage, so debugging usually ends at the upstream repository and generated-client compatibility checks. Treat generated code as a vendored, non-editable artifact and plan who regenerates it when the API changes.
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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings