{"id":46146602,"url":"https://github.com/blacksmoke26/json2ts","last_synced_at":"2026-03-02T07:33:32.902Z","repository":{"id":325608782,"uuid":"1099793191","full_name":"blacksmoke26/json2ts","owner":"blacksmoke26","description":"A powerful tool that automatically generates TypeScript interfaces from JSON objects, making type-safe development easier and more efficient.","archived":false,"fork":false,"pushed_at":"2025-11-29T12:58:50.000Z","size":143,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-04T17:49:56.074Z","etag":null,"topics":["codegen","codegenerator","flattened-interface","interface","json","json-parser","json-to-ts","json-to-ts-interface","json-to-typescript","json-type-generator","jsontots","typescript","typescript-utility"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@junaidatari/json2ts","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blacksmoke26.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-19T13:00:24.000Z","updated_at":"2025-11-29T12:58:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/blacksmoke26/json2ts","commit_stats":null,"previous_names":["blacksmoke26/json2ts"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/blacksmoke26/json2ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacksmoke26%2Fjson2ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacksmoke26%2Fjson2ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacksmoke26%2Fjson2ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacksmoke26%2Fjson2ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blacksmoke26","download_url":"https://codeload.github.com/blacksmoke26/json2ts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacksmoke26%2Fjson2ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29995042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codegen","codegenerator","flattened-interface","interface","json","json-parser","json-to-ts","json-to-ts-interface","json-to-typescript","json-type-generator","jsontots","typescript","typescript-utility"],"created_at":"2026-03-02T07:33:32.371Z","updated_at":"2026-03-02T07:33:32.892Z","avatar_url":"https://github.com/blacksmoke26.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON to TypeScript Interface Converter \n\nA powerful tool that automatically generates TypeScript interfaces\nfrom JSON objects, making type-safe development easier and more efficient.\n\n## Features ✨\n\n- 🔧 Convert JSON to TypeScript interfaces with ease\n- 📦 Generate separate interfaces for nested objects\n- 🔢 Intelligent type inference for Numbers, Strings, Booleans, and null values\n- 📋 Create type definitions for arrays, objects and primitive types\n- 🔄 Transform nested/complex JSON into flattened interface via `--flat` flag\n- ✏️ Specify custom names for root interfaces\n- 🗂️ Preserve original JSON structure in generated interfaces\n- 🌐 Export options for generated interfaces (`all`, `root`, `none`)\n- 📊 Handle complex nested structures with arrays of objects\n- 🚀 Fast and lightweight CLI for quick conversions\n- 📝 Support for both file and direct text input\n- 🔌 Read JSON output directly from the *stdin* for pipeline operations\n- ✏️ Added property name suggestion and correction logic based on strict TypeScript identifier rules\n- 🔄 Automatically detects and resolves circular references in JSON structures to prevent infinite recursion\n- 🛡️ Generate strict TypeScript types with exact property matching when enabled via `--strict` flag\n- 🔒 Read-only Properties: Generate immutable interfaces with `readonly` modifier\n- ❓ Optional Properties: Generate interfaces with all properties marked optional (`?`)\n- 🐪 **Property Case Transformation**: Convert property names to various case formats:\n  - `c` - camelCase (`userName`)\n  - `l` - lower_snake_case (`user_name`)\n  - `o` - preserve original *(default)*\n  - `p` - PascalCase (`UserName`)\n  - `u` - UPPER_SNAKE_CASE (`USER_NAME`)\n  - `k` - kebab-case (`user-name`)\n- 📐 **Smart Array Type Detection**: Automatically infers array types including:\n  - Primitive arrays (e.g., `string[]`, `number[]`)\n  - Mixed-type tuples (e.g., `[string, number, boolean]`)\n  - Object arrays (e.g., `User[]`)\n  - Nested arrays with proper type preservation\n- 🗺️ **Custom Type Mapping**: Override default type detection with custom mappings:\n  - Map specific JSON properties to custom TypeScript types\n  - Useful for integrating with existing type definitions\n  - Example: Map `\"user_id\"` to `UserID` type\n  - Configure via `typeMap` option in API or CLI\n\n## Command Line Interface 💻\n\nThe package includes a command-line interface (CLI) for quick conversions\nwithout writing code.\n\n### Installation 📦\n\n```bash\nnpm install -g @junaidatari/json2ts   # NPM\npnpm install -g @junaidatari/json2ts  # PNPM\nyarn global add @junaidatari/json2ts  # Yarn\n```\n\n### Command Options ⚙️\n\n| Option                  | Type     | Description                              | Default        |\n|-------------------------|----------|------------------------------------------|----------------|\n| `-f, --file`            | `string` | Path to JSON file to convert             | Required*      |\n| `-t, --text`            | `string` | Raw JSON string to convert               | Required*      |\n| `-o, --output`          | `string` | Output file path                         | Prints to console |\n| `-n, --name`            | `string` | Root interface name                      | `RootObject`   |\n| `-l, --flat`            | `boolean`| Generate flattened interface             | -              |\n| `-e, --export`          | `string` | Export type: `a`=all, `r`=root, `n`=none | `r` *(root)* |\n| `--pc, --property-case` | `string` | Property case transformation: `c`=camelCase, `l`=lower_snake, `o`=original, `p`=PascalCase, `u`=UPPER_SNAKE, `k`=kebab-case | `o` *(original)* |\n| `-s, --strict`          | `boolean`| Generate strict TypeScript types with exact property matching | - |\n| `-r, --readonly`        | `boolean`| Make all generated properties readonly | - |\n| `--op, --optional`      | `boolean`| Make all generated properties optional | - |\n\nEither `--file` or `--text` must be provided or pipe through to read directly from the stdin.\n\n### Examples 📝\n\n#### Basic file conversion\n\n```bash\njson2ts -f input.json -o types.ts -n ApiResponse\n```\n\n#### Direct text conversion\n\n```bash\n# Linux/Mac\njson2ts -t '{\"user\": {\"name\": \"John\"}}' -n User\n\n# Windows\njson2ts -t \"{\\\"user\\\": {\\\"name\\\": \\\"John\\\"}}\" -n User\n```\n\n#### Readonly properties\n\n```bash\n# Generate with readonly properties\njson2ts -f input.json -o readonly-types.ts -n Data --readonly\n\n# Combine with strict mode\njson2ts -f input.json -o strict-readonly.ts -n Data --strict --readonly\n```\n\n#### Optional properties\n\n```bash\n# Generate with optional properties\njson2ts -f input.json -o optional-types.ts -n Data --op\n\n# Combine with readonly mode\njson2ts -f input.json -o readonly-optional.ts -n Data --readonly --optional\n```\n\n#### Generate flattened interface\n\n```bash\njson2ts -f complex.json -o flat-types.ts -n Data --flat\n```\n\n#### Export all interfaces\n\n```bash\njson2ts -f input.json -o types.ts -n Response -e a\n```\n\n#### No exports (internal interfaces)\n\n```bash\njson2ts -f input.json -o types.ts -n Response --export n\n```\n\n#### Property case transformation\n\n```bash\n# Convert to camelCase properties\njson2ts -f input.json -o camel-types.ts --pc c\n\n# Convert to PascalCase properties\njson2ts -f input.json -o pascal-types.ts --property-case p\n\n# Convert to kebab-case properties\njson2ts -f input.json -o kebab-types.ts --property-case k\n```\n\n#### Strict mode generation\n\n```bash\n# Generate with strict type checking\njson2ts -f input.json -o strict-types.ts -n Data --strict\n```\n\n#### Combined options\n\n```bash\n# Multiple options together\njson2ts -f input.json -o output.ts -n ApiResponse -e a --property-case c --strict\n\n# Flattened with property transformation\njson2ts -f data.json -o flat.ts -n FlatData --flat --property-case l\n```\n\n#### Root-only export\n\n```bash\n# Export only root interface (default)\njson2ts -f input.json -o types.ts -n Response\n# or explicitly\njson2ts -f input.json -o types.ts -n Response -e r\n```\n\n#### Pipeline with curl\n\n```bash\ncurl -s https://jsonplaceholder.typicode.com/posts/1 | \\\n  json2ts -n UserResponse -o user-types.ts\n```\n\n#### Pipeline with other commands\n\n```bash\n# Convert from clipboard (Linux)\nxclip -selection clipboard -o | json2ts -n ClipboardData\n\n# Convert from file and copy to clipboard\njson2ts -f data.json | tee types.ts | pbcopy\n\n# Format with prettier\ncurl -s https://api.example.com/data | json2ts -n Data | \\\n  npx prettier --parser typescript\n```\n\n#### Configuration files\n\n```bash\n# Convert package.json\ncat package.json | json2ts -n PackageConfig -o package-types.ts\n\n# Convert tsconfig.json\njson2ts -f tsconfig.json -n TsConfig -o tsconfig-types.ts\n```\n\n#### Database exports\n\n```bash\n# MongoDB export\nmongoexport --collection users --out users.json\njson2ts -f users.json -n UserDoc -o user-types.ts --export a\n\n# PostgreSQL query\npsql -c \"SELECT row_to_json(t) FROM (SELECT * FROM users) t\" | \\\n  json2ts -n DBUser -o db-types.ts\n```\n\n#### Interactive usage\n\n```bash\necho '{\"name\": \"test\", \"data\": {\"items\": [1, 2, 3]}}' | \\\n  json2ts -n TestData\n\njson2ts -n Config -o config-types.ts \u003c\u003c EOF\n{\n  \"server\": {\"port\": 3000},\n  \"database\": {\"url\": \"mongodb://localhost\"}\n}\nEOF\n```\n\n#### Development workflows\n\n```bash\n# Generate types from API schema\ncurl -s \"$API_SCHEMA_URL\" | json2ts -n Schema -o src/types/api.ts\n\n# Watch for changes\nwhile inotifywait -e modify data/; do\n  for file in data/*.json; do\n    base=$(basename \"$file\" .json)\n    json2ts -f \"$file\" -o \"types/${base}.ts\" -n \"${base^}Type\"\n  done\ndone\n\n# Process all JSON files\nfind src/data -name \"*.json\" -exec sh -c \\\n  'json2ts -f \"$0\" -o \"src/types/$(basename \"$0\" .json).ts\"' {} \\;\n```\n\n#### Multiple files script\n\n```bash\nfor file in data/*.json; do\n  base=$(basename \"$file\" .json)\n  json2ts -f \"$file\" -o \"types/${base}.ts\" -n \"${base^}Data\"\ndone\n```\n\n#### Real-world API integration\n\n```bash\n# GitHub API: Get repository information\ncurl -s https://api.github.com/repos/torvalds/linux | \\\n  json2ts -n GithubRepo -o repo-types.ts --property-case c\n\n# Reddit API: Fetch subreddit posts\ncurl -s -H \"User-Agent: json2ts\" \\\n  \"https://www.reddit.com/r/typescript/top.json?limit=10\" | \\\n  json2ts -n RedditPost -o reddit-types.ts --export a\n\n# GraphQL API query with curl\ncurl -s -X POST https://api.spacex.land/graphql \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"query\": \"{ launches { id name rocket { name } } }\"}' | \\\n  jq -r '.data.launches[0]' | \\\n  json2ts -n SpaceXLaunch -o spacex-types.ts --property-case p\n```\n\n#### Database schema introspection\n\n```bash\n# PostgreSQL schema extraction\npsql -d myapp -c \"\n  SELECT json_agg(t) FROM (\n    SELECT \n      table_name,\n      array_agg(column_name::text) as columns,\n      array_agg(data_type::text) as types\n    FROM information_schema.columns \n    WHERE table_schema = 'public'\n    GROUP BY table_name\n  ) t\n\" | json2ts -n DBSchema -o db-schema.ts --readonly\n\n# MongoDB collection structure analysis\nmongo myapp --eval \"\n  db.users.findOne().forEach(printjson)\n\" | json2ts -n MongoUser -o mongo-types.ts --strict\n\n# Prisma schema introspection\nnpx prisma introspect --print | \\\n  grep -o '\"model\"[^}]*}' | \\\n  json2ts -n PrismaModel -o prisma-types.ts --export a\n```\n\n#### Configuration management\n\n```bash\n# Kubernetes deployment analysis\nkubectl get deployment myapp -o json | \\\n  json2ts -n K8sDeployment -o k8s-types.ts --readonly\n\n# Docker compose configuration\ndocker compose config --format json | \\\n  json2ts -n DockerCompose -o compose-types.ts --property-case l\n\n# Terraform state parsing\nterraform show -json | \\\n  jq '.values.root_module.resources[] | select(.type == \"aws_instance\")' | \\\n  json2ts -n TFInstance -o terraform-types.ts --strict\n```\n\n#### Testing and validation\n\n```bash\n# Generate test types from JSON schema\njsonschema2jsonpointer schema.json | \\\n  jq -r '.[] | .pointer' | \\\n  xargs -I {} json2ts -f schema.json -n TestSchema --strict\n\n# Validate API responses against types\nfor endpoint in users posts comments; do\n  curl -s \"https://api.example.com/$endpoint\" | \\\n    json2ts -n \"${endpoint^}Response\" -o \"test/types/${endpoint}.ts\"\ndone\n\n# Generate mock data types\njq -n '{\n  users: [range(10) | {\n    id: .,\n    name: \"User\\(.)\",\n    email: \"user\\(.)@example.com\",\n    roles: [\"user\", (\\. % 3 == 0 and \"admin\" or empty)]\n  }]\n}' | json2ts -n MockUsers -o mock-types.ts --export a\n```\n\n#### Advanced pipeline operations\n\n```bash\n# Multi-stage transformation\ncurl -s https://api.exchangerate-api.com/v4/latest/USD | \\\n  jq '{rates: .rates | to_entries | map({key: .key, value: .value})}' | \\\n  json2ts -n ExchangeRate -o rates.ts --property-case c | \\\n  npx prettier --parser typescript \u003e src/types/rates.ts\n\n# Parallel processing\necho 'users posts comments products' | \\\n  tr ' ' '\\n' | \\\n  xargs -P 4 -I {} bash -c \"\n    curl -s \\\"https://api.example.com/{}\\\" | \\\n      json2ts -n \\\"\\$(echo {} | sed 's/.*/\\u\u0026/')\\\" -o \\\"types/{}.ts\\\"\n  \"\n\n# Conditional type generation\njson2ts -f data.json -o temp.ts -n Data \u0026\u0026 \\\nif grep -q 'interface.*{' temp.ts; then\n  echo \"Generated interface:\"\n  cat temp.ts\nelse\n  echo \"No interfaces generated\"\nfi\nrm temp.ts\n```\n\n#### Enterprise workflows\n\n```bash\n# Service mesh configuration\nistioctl proxy-config routes deployment/reviews.default -o json | \\\n  jq '.httpRoutes[0].route[0].match' | \\\n  json2ts -n IstioRoute -o istio-types.ts --readonly\n\n# OpenAPI schema conversion\ncurl -s https://petstore.swagger.io/v2/swagger.json | \\\n  jq '.definitions' | \\\n  json2ts -n PetStore -o api-types.ts --export a\n\n# Microservice contract generation\nfor service in auth payment notification; do\n  curl -s \"https://contract-registry.internal/api/v1/contracts/$service\" | \\\n    jq '.schema' | \\\n    json2ts -n \"${service^}Contract\" -o \"src/contracts/${service}.ts\" --strict\ndone\n\n# CloudFormation template parsing\naws cloudformation get-template --stack-name my-stack | \\\n  jq -r '.TemplateBody' | \\\n  json2ts -n CFTemplate -o cf-types.ts --property-case k\n```\n\n#### CI/CD integration\n\n```bash\n# GitHub Actions workflow validation\nfind .github/workflows -name '*.yml' -exec \\\n  yq eval -o json {} \\; | \\\n  json2ts -n GitHubAction -o action-types.ts\n\n# Azure DevOps pipeline analysis\naz pipelines show --id $(az pipelines list --query [0].id -o tsv) | \\\n  jq '.process' | \\\n  json2ts -n AzPipeline -o pipeline-types.ts\n\n# Dockerfile instruction parsing\ndocker inspect $(docker build -q .) | \\\n  jq -r '.[0].Config.Labels' | \\\n  json2ts -n DockerLabels -o labels.ts --readonly\n```\n\n### Tips 💡\n\n- Check version: `json2ts --version`\n- View help: `json2ts --help`\n\n## Programmatic API 📚\n\n### Installation\n\n```bash\nnpm install @junaidatari/json2ts   # NPM\npnpm install @junaidatari/json2ts  # PNPM\nyarn add @junaidatari/json2ts      # Yarn\n```\n\n### Usage 🚀\n\n```typescript\nimport { \n  JsonToTsConverter, \n  JsonToFlattenedTsConverter, \n} from '@junaidatari/json2ts';\n\n// Sample JSON object\nconst json = {\n  user: {\n    name: 'John',\n    age: 30,\n    address: {\n      street: '123 Main St',\n      city: 'New York'\n    }\n  }\n};\n\n// Sample JSON string\nconst jsonText = `{\n  \"_id\": \"691da8feb00505c1c11b08b9\",\n  \"index\": 0,\n  \"guid\": \"9150daa4-b7c4-4230-a3b8-ddd2eb05731f\",\n  \"isActive\": true,\n  \"balance\": \"$3,816.81\",\n  \"picture\": \"http://placehold.it/32x32\",\n  \"age\": 39,\n  \"eyeColor\": \"blue\",\n  \"name\": \"Vickie Snow\",\n  \"gender\": \"female\",\n  \"company\": \"DATACATOR\",\n  \"email\": \"vickiesnow@datacator.com\",\n  \"phone\": \"+1 (925) 537-2747\",\n  \"address\": \"843 Interborough Parkway, Floris, Washington, 5608\",\n  \"registered\": \"2018-11-01T06:02:48 -05:00\",\n  \"latitude\": -42.568798,\n  \"longitude\": -77.971543,\n  \"tags\": [\n    \"fugiat\",\n    \"reprehenderit\",\n    \"culpa\",\n    \"veniam\",\n    \"enim\",\n    \"occaecat\",\n    \"et\"\n  ],\n  \"friends\": [\n    {\n      \"id\": 0,\n      \"name\": \"Silvia Ferrell\"\n    },\n    {\n      \"id\": 1,\n      \"name\": \"Kirkland Benson\"\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Howe Hester\"\n    }\n  ],\n  \"greeting\": \"Hello, Vickie Snow! You have 10 unread messages.\",\n  \"favoriteFruit\": \"strawberry\"\n}\n`;\n\n// Convert to multiple interfaces with all exports\nconst interfaces = JsonToTsConverter.convert(json, 'Person', 'all');\nconsole.log('Generated interfaces:');\nconsole.log(interfaces);\n/* Output:\nexport interface Person {\n  user: User;\n}\n\nexport interface User {\n  name: string;\n  age: number;\n  address: Address;\n}\n\nexport interface Address {\n  street: string;\n  city: string;\n}\n*/\n\n// Convert to flattened interface\nconst interfaceFlat = JsonToFlattenedTsConverter.convert(jsonText, 'PersonFlat', 'all');\nconsole.log('\\nGenerated flattened interface:');\nconsole.log(interfaceFlat);\n/* Output:\nexport interface PersonFlat {\n  _id: string;\n  index: number;\n  guid: string;\n  isActive: boolean;\n  balance: string;\n  picture: string;\n  age: number;\n  eyeColor: string;\n  name: string;\n  gender: string;\n  company: string;\n  email: string;\n  phone: string;\n  address: string;\n  registered: string;\n  latitude: number;\n  longitude: number;\n  tags: string[];\n  friends: {\n    id: number;\n    name: string;\n  }[];\n  greeting: string;\n  favoriteFruit: string;\n}\n*/\n\n// Example with complex nested structure\nconst complexJson = {\n  data: {\n    users: [\n      {\n        id: 1,\n        profile: {\n          name: 'Alice',\n          preferences: {\n            theme: 'dark',\n            notifications: {\n              email: true,\n              push: false\n            }\n          }\n        }\n      }\n    ],\n    metadata: {\n      total: 1,\n      page: 1\n    }\n  }\n};\n\nconst complexTypes = JsonToTsConverter.convert(complexJson, 'ApiResponse', 'root');\nconsole.log(complexTypes);\n/* Output:\nexport interface ApiResponse {\n  data: Data;\n}\n\ninterface Data {\n  users: User[];\n  metadata: Metadata;\n}\n\ninterface User {\n  id: number;\n  profile: Profile;\n}\n\ninterface Profile {\n  name: string;\n  preferences: Preferences;\n}\n\ninterface Preferences {\n  theme: string;\n  notifications: Notifications;\n}\n\ninterface Notifications {\n  email: boolean;\n  push: boolean;\n}\n\ninterface Metadata {\n  total: number;\n  page: number;\n}\n*/\n\n// Real-world example: API response handler\nasync function handleApiResponse() {\n  // Simulate API response\n  const apiResponse = await fetch('https://jsonplaceholder.typicode.com/posts/1');\n  const data = await apiResponse.json();\n\n  // Generate types dynamically\n  const types = JsonToTsConverter.convert(data, 'PostResponse', 'root');\n  console.log(types);\n  /*\n  export interface PostResponse {\n    userId: number;\n    id: number;\n    title: string;\n    body: string;\n  }\n  */\n}\n```\n\n## API Reference 📖\n\n### Methods\n\n#### `JsonToTsConverter.convert(json, name?, export?, options?)`\n\n#### `JsonToFlattenedTsConverter.convert(json, name?, export?, options?)`\n\nConverts JSON to TypeScript interfaces.\n\n**Parameters:**\n\n- `json`: JSON object or string to convert\n- `name`: Root interface name *(default: `'RootObject'`)*\n- `export`: Export mode (`'all'`, `'root'`, `'none'`) *(default: `'root'`)*\n- `options`: Configuration options for conversion *(optional)*\n  - `arrayMaxTupleSize`: Maximum number of items to convert to tuple type \n    (default: `10`)\n  - `arrayMinTupleSize`: Minimum number of items required to create a tuple type \n    (default: `2`)\n  - `strict`: Enable strict type checking for better type inference \n    (default: `false`)\n  - `typeMap`: Custom type mapping for specific JSON structures \n    (default: `{}`)\n  - `propertyCase`: Naming convention for generated property names \n    (default: `'original'`)\n  - `readonlyProperties`: Make all generated properties readonly \n    (default: `false`)\n  - `optionalProperties`: Make all generated properties optional \n    (default: `false`)\n\n**Returns:** Generated TypeScript interfaces string\n\n## Contributing 🤝\n\nWe welcome contributions! Please follow these steps:\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Development Setup 🔧\n\n```bash\ngit clone https://github.com/blacksmoke26/json2ts.git\ncd json2ts\nnpm install\nnpm run dev\nnpm run dev:flat\n```\n\n### Testing CLI with `/samples/*.json` JSON files\n```bash\nnpm run build\nnode .\\bin\\json2ts -f .\\samples\\jsons\\sample.json -n Sample1\nnode .\\bin\\json2ts -f .\\samples\\jsons\\sample2.json -n Sample2 -o sample2.ts --flat\n```\n\n### Running test cases\n```bash\nnpm run test\n```\n\n## License 📄\n\nThis project is licensed under the ISC License.\n\n## Support 💬\n\nIf you encounter issues or have questions:\n\n- Search existing [GitHub Issues](https://github.com/blacksmoke26/json2ts/issues)\n- Create a [new issue](https://github.com/blacksmoke26/json2ts/issues/new)\n\n## Acknowledgments 🙏\n\n- Originally developed for [Posquelize](https://github.com/blacksmoke26/posquelize)\n- Thanks to all contributors\n- Inspired by the need for type safety in JSON-heavy applications\n\n## Copyright ©️\n\nDeveloped with ❤️ by Junaid Atari\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacksmoke26%2Fjson2ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblacksmoke26%2Fjson2ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacksmoke26%2Fjson2ts/lists"}