Package JSON
Package JSON is a JavaScript Object Notation sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.
package.jsonData
JavaScript Object Notation is a data format commonly identified by .json. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.
7B {5B [SIGNATURE = bytes.fromhex("7b")
OFFSET = 0
def is_json(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATUREconst SIGNATURE = [0x7b];
const OFFSET = 0;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isJson(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}package fileid
import "bytes"
var isjsonSignature = []byte{0x7b}
const isjsonOffset = 0
func IsJson(b []byte) bool {
end := isjsonOffset + len(isjsonSignature)
if len(b) < end {
return false
}
return bytes.Equal(b[isjsonOffset:end], isjsonSignature)
}const SIGNATURE: &[u8] = &[0x7b];
const OFFSET: usize = 0;
fn is_json(bytes: &[u8]) -> bool {
bytes.get(OFFSET..OFFSET + SIGNATURE.len()) == Some(SIGNATURE)
}<?php
$signature = "\x7b";
$offset = 0;
function is_json(string $bytes): bool {
global $signature, $offset;
return substr($bytes, $offset, strlen($signature)) === $signature;
}JavaScript Object Notation is used for data exchange, imports, exports, parser testing, and validation workflows. Encoding, delimiters, versions, and container structure often change implementation behavior.
Untrusted input is not safe just because the format was detected. Account for parser exceptions, large files, unexpected encodings, and external references.
11 samples help test leading-byte detection, parser errors, upload limits, and download behavior.
Package JSON is a JavaScript Object Notation sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.
package.jsonBlue Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.json13424717c87f786e7bcee999a47d958e60c0befc3456dbf6a1ddc9de7f7f13e6Flower Garden JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
02-flower-garden.json639ca42d44746f8d2d5553fe737f18a7c49524332eb7558e1a920a6d4283a6c4Navy Blue Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
03-navy-blue-sky.json8d41fe37d5a796b6ec3d08b6acfdf94c988e4ccd184f26c137b8569095cbdd97Nature of the Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
04-nature-sky.json99ee168edc0b2ccff52ac45d6917312dfb924f37a7e429cfac14b79057f2e198Sky Landscape JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
05-sky-landscape.json6aa1c8bc4fc46d769a7adddb67d0a9eafc78e68305400bf7840700cf7da88947Starry Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
06-starry-sky.json88daf0799c063059e82966648aebdc2a99d6127b86e40c969350da16ffb56698Blue Night Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
07-blue-night-sky.json811f6083cba15f1817a71a7165c09cec75656e2c7bc8ec8adde2ecf15ce9c988Hibiscus Flower JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
08-hibiscus-flower.json941fa1a5c64dfc77b8b0a047b4d07df12d2008dc8f402883e218d228ac9a8ee0Arctic Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
09-arctic-sky.jsonc55d9943edf58b8b40ddde65e89a9e7ac32f5a26619cc5605dd6214e3533b6e5NASA Blue Marble JSON is a JavaScript Object Notation sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.
nasa-blue-marble-2012-east.jsonab16f5b759281d30393fe3fd61d080a2ead45dc82f1d1f1caa625f750aef54ddJavaScript Object Notation files begin with the byte signature 7B ("{") or 5B ("["). Detect the format by reading these leading bytes rather than trusting the file extension alone.
The MIME type for JavaScript Object Notation is application/json.
JavaScript Object Notation files use the .json extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.