Skip to content

fix: preserve JSON scalar input types in local storage - #1243

Open
peterolkhov wants to merge 1 commit into
apify:masterfrom
peterolkhov:codex/preserve-local-json-input-types
Open

peterolkhov wants to merge 1 commit into
apify:masterfrom
peterolkhov:codex/preserve-local-json-input-types

Conversation

@peterolkhov

Copy link
Copy Markdown

A pre-existing INPUT.json or valid JSON INPUT file in local storage gets its metadata inferred from the parsed value. Scalars then read back as plain text or bytes, so false, 42, and null lose their JSON types.

This keeps successful JSON parsing as the source of the content type. The tests cover both filenames, scalar and falsy values, object/array controls, unchanged input bytes, explicit metadata, and malformed JSON. Existing metadata is respected; this does not rewrite sidecars created earlier.

Tested: uv run poe check-code (lint, type check, 767 unit tests) and the focused filesystem/Actor/storage tests (75 passed).

Prepared with Codex assistance.

@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant