balping/json-raw-encoder
Laravel helper for encoding JSON while preserving “raw” fragments (like JS functions or pre-encoded JSON) without extra quoting/escaping. Handy for configs and API payloads when parts must stay untouched, with a simple API and reliable output.
balping/json-raw-encoder is a small PHP utility that augments json_encode() by allowing raw JSON injection for selected values. It’s useful when you need to embed pre-encoded JSON fragments (or JSON-producing expressions) without them being escaped as strings, while keeping the rest of the payload safely encoded.
Ideal for constructing complex API responses or configuration blobs where some fields must remain verbatim JSON.
json_encode() options and flagsHow can I help you explore Laravel packages today?