non-json-content-types

Enable tRPC mutations to accept FormData and binary streams via octetInputParser and splitLink.

2|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/PlazaCC/antes-da-tela --skill non-json-content-types
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: non-json-content-types
Source: https://github.com/PlazaCC/antes-da-tela/tree/main/.agents/skills/non-json-content-types
Command: npx skills add https://github.com/PlazaCC/antes-da-tela --skill non-json-content-types

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enable tRPC backends to accept and process non-JSON inputs such as FormData and binary streams in mutations, avoiding reliance on JSON parsing and enabling efficient file uploads and binary data handling.

Core Features & Use Cases

  • FormData mutations: Accept FormData payloads in server mutations and read fields.
  • Binary streaming: Use octetInputParser to convert binary inputs to ReadableStream on the server.
  • Client routing: Route non-JSON requests using splitLink and isNonJsonSerializable() to ensure proper data flow.
  • Use Case: Upload files and submit binary data via mutations without manual encoding.

Quick Start

Install and configure tRPC server to use octetInputParser for binary inputs and route non-JSON requests with splitLink on the client.

Frequently Asked Questions about non-json-content-types

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle file uploads and binary data in tRPC mutations?

Handle file uploads and binary data in tRPC mutations by using octetInputParser on the server to convert binary inputs to ReadableStream and routing requests with splitLink on the client. This avoids manual encoding and JSON parsing limitations.

Can I send FormData directly to a tRPC server mutation?

Yes, you can send FormData directly to a tRPC server mutation. The backend uses octetInputParser to read FormData fields and binary streams, while the client uses splitLink and isNonJsonSerializable to ensure proper data routing.

What is the best way to route non-JSON requests in tRPC?

The best way to route non-JSON requests in tRPC is using splitLink combined with isNonJsonSerializable on the client. This safely directs FormData and binary payloads to the server, bypassing standard JSON serialization.

Does tRPC support binary streams and FormData for queries?

No, tRPC does not support binary streams and FormData for queries. The octetInputParser and splitLink configuration enforces that FormData and binary inputs are only supported for POST mutations, not query operations.

Why do I need splitLink for tRPC file uploads?

You need splitLink for tRPC file uploads to route non-JSON payloads safely. It works with isNonJsonSerializable to direct binary streams and FormData to the server via octetInputParser, preventing standard JSON serialization errors.

How does octetInputParser process binary inputs on the tRPC server?

octetInputParser processes binary inputs on the tRPC server by converting incoming binary data into a ReadableStream. This allows mutations to directly handle file uploads and FormData without relying on JSON parsing.