๐Ÿ” JSON Viewer Pro - Comprehensive Test Page

Testing all supported data types, formats, and programming language outputs

JSON Python JavaScript PHP Java C# Ruby

๐Ÿ”— Pure JSON Objects JSON

Simple Object

Basic JSON object with different data types
{"name": "John Doe", "age": 30, "active": true, "balance": 1250.75, "skills": null}

Nested Object

Complex nested JSON structure
{
  "user": {
    "id": 12345,
    "profile": {
      "name": "Alice Smith",
      "email": "alice@example.com",
      "preferences": {
        "theme": "dark",
        "language": "en",
        "notifications": {
          "email": true,
          "push": false,
          "sms": true
        }
      }
    },
    "posts": [
      {
        "id": 1,
        "title": "Hello World",
        "content": "This is my first post!",
        "tags": ["introduction", "hello"],
        "metadata": {
          "views": 1250,
          "likes": 45,
          "created_at": "2024-01-15T10:30:00Z"
        }
      }
    ]
  }
}

Array of Objects

JSON array containing multiple objects
[
  {"id": 1, "name": "Product A", "price": 99.99, "inStock": true},
  {"id": 2, "name": "Product B", "price": 149.99, "inStock": false},
  {"id": 3, "name": "Product C", "price": 79.99, "inStock": true}
]

๐Ÿ Python Output Dumps Python

Python Dictionary

Python dict output with single quotes
{'name': 'Bob Johnson', 'age': 25, 'active': True, 'balance': None, 'hobbies': ['reading', 'coding']}

Python List

Python list with mixed data types
[{'id': 1, 'status': 'active'}, {'id': 2, 'status': 'inactive'}, True, False, None]

Complex Python Structure

Nested Python dictionary with various data types
{ 'database': { 'host': 'localhost', 'port': 5432, 'credentials': { 'username': 'admin', 'password': 'secret123', 'ssl_enabled': True }, 'tables': ['users', 'posts', 'comments'], 'last_backup': None }, 'api_endpoints': [ {'path': '/api/users', 'method': 'GET', 'authenticated': True}, {'path': '/api/posts', 'method': 'POST', 'authenticated': False} ] }

๐ŸŸจ JavaScript Console Output JavaScript

Console.log Object

JavaScript object from console.log
Object { name: "Sarah Wilson", age: 28, city: "New York" }

Console.log Array

JavaScript array output from console
Array(3) [ "apple", "banana", "cherry" ]

Complex JavaScript Object

Nested JavaScript object with functions
Object { config: { apiUrl: "https://api.example.com", timeout: 5000, retries: 3, headers: { "Content-Type": "application/json", "Authorization": "Bearer token123" } }, methods: ["GET", "POST", "PUT", "DELETE"], initialized: true }

๐Ÿ”ท PHP var_dump Output PHP

PHP Array

PHP associative array dump
array(3) {
  ["name"]=> string(10) "Mike Davis"
  ["email"]=> string(20) "mike@example.com"
  ["active"]=> bool(true)
}

PHP Object

PHP object var_dump
object(User)#1 (4) { ["id"]=> int(101) ["username"]=> string(8) "john_doe" ["roles"]=> array(2) { [0]=> string(4) "user" [1]=> string(5) "admin" } ["created_at"]=> string(19) "2024-01-15 10:30:00" }

Complex PHP Structure

Nested PHP array with multiple data types
array(2) {
  ["users"]=> array(2) {
    [0]=> array(3) {
      ["id"]=> int(1)
      ["name"]=> string(9) "Alice Doe"
      ["active"]=> bool(true)
    }
    [1]=> array(3) {
      ["id"]=> int(2)
      ["name"]=> string(8) "Bob Smith"
      ["active"]=> bool(false)
    }
  }
  ["meta"]=> array(2) {
    ["total"]=> int(2)
    ["page"]=> int(1)
  }
}

โ˜• Java Object Output Java

Java HashMap

Java HashMap toString output
{name=Emma Johnson, age=32, department=Engineering, salary=75000.0}

Java ArrayList

Java ArrayList with objects
[User{id=1, name='Alice'}, User{id=2, name='Bob'}, User{id=3, name='Charlie'}]

Complex Java Object

Nested Java object structure
Company{
  name='TechCorp',
  employees=[
    Employee{id=1, name='John', position='Developer'},
    Employee{id=2, name='Jane', position='Designer'}
  ],
  address=Address{street='123 Main St', city='Boston', zip='02101'},
  founded=2010
}

๐Ÿ”ท C# Object Output C#

C# Anonymous Object

C# anonymous object output
{ Name = "David Wilson", Age = 29, IsActive = True, Balance = 2500.50 }

C# List

C# List collection
List`1[System.String] { "item1", "item2", "item3" }

C# Complex Object

C# object with properties
Customer {
  Id = 12345,
  Profile = UserProfile {
    FirstName = "Lisa",
    LastName = "Brown",
    Email = "lisa@example.com",
    Preferences = Settings {
      Theme = "Dark",
      Language = "English",
      Notifications = True
    }
  },
  Orders = Order[] {
    Order { Id = 1, Total = 99.99, Status = "Shipped" },
    Order { Id = 2, Total = 149.99, Status = "Processing" }
  }
}

๐Ÿ’Ž Ruby Object Output Ruby

Ruby Hash

Ruby hash with symbols and strings
{:name=>"Ruby Developer", :age=>27, "active"=>true, "projects"=>["rails_app", "sinatra_api"]}

Ruby Array

Ruby array with mixed types
[{:id=>1, :title=>"First Post"}, {:id=>2, :title=>"Second Post"}, true, nil]

Complex Ruby Structure

Nested Ruby object with symbols
{
  :application => {
    :name => "MyApp",
    :version => "1.0.0",
    :config => {
      :database => {
        :adapter => "postgresql",
        :host => "localhost",
        :port => 5432
      },
      :cache => {
        :store => "redis",
        :ttl => 3600
      }
    },
    :features => ["authentication", "api", "admin_panel"]
  }
}

๐Ÿ”€ Mixed Content Scenarios

Multiple JSON Objects

Page with multiple separate JSON objects
User Data:
{"userId": 123, "username": "testuser", "email": "test@example.com"}
Configuration:
{"apiEndpoint": "https://api.example.com", "timeout": 30000, "retries": 3}
Statistics: {"totalUsers": 1500, "activeUsers": 1200, "growth": 15.5}

Mixed Programming Languages

Different language outputs on same page
Python Output:
{'status': 'success', 'data': [1, 2, 3], 'error': None}
JavaScript Output: Object { status: "success", data: Array(3), error: null }
PHP Output:
array(3) {
  ["status"]=> string(7) "success"
  ["data"]=> array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }
  ["error"]=> NULL
}

โš ๏ธ Error Cases & Edge Cases

Invalid JSON

Malformed JSON that should trigger error handling
{"name": "Invalid JSON", "missing_quote: true, "extra_comma":, }

Empty Structures

Empty objects and arrays
{}
[]

Very Large JSON

Large JSON structure to test performance
{ "users": [ {"id": 1, "name": "User 1", "data": {"a": 1, "b": 2, "c": 3, "d": 4, "e": 5}}, {"id": 2, "name": "User 2", "data": {"a": 1, "b": 2, "c": 3, "d": 4, "e": 5}}, {"id": 3, "name": "User 3", "data": {"a": 1, "b": 2, "c": 3, "d": 4, "e": 5}}, {"id": 4, "name": "User 4", "data": {"a": 1, "b": 2, "c": 3, "d": 4, "e": 5}}, {"id": 5, "name": "User 5", "data": {"a": 1, "b": 2, "c": 3, "d": 4, "e": 5}} ], "metadata": { "total": 5, "page": 1, "per_page": 10, "has_more": false, "generated_at": "2024-01-15T10:30:00Z" } }

Special Characters

JSON with special characters and unicode
{"message": "Hello ๐ŸŒ", "unicode": "Special chars: ร รกรขรฃรครฅรฆรงรจรฉ", "symbols": "!@#$%^&*()"}

๐ŸŒ API Response Examples

REST API User Response

Typical REST API JSON response
{
  "status": "success",
  "data": {
    "user": {
      "id": 12345,
      "username": "johndoe",
      "email": "john@example.com",
      "profile": {
        "firstName": "John",
        "lastName": "Doe",
        "avatar": "https://example.com/avatar.jpg",
        "bio": "Software developer with 5+ years experience"
      },
      "preferences": {
        "theme": "dark",
        "language": "en",
        "timezone": "UTC-5"
      },
      "stats": {
        "postsCount": 42,
        "followersCount": 150,
        "followingCount": 89
      },
      "createdAt": "2020-01-15T10:30:00Z",
      "lastLoginAt": "2024-01-15T09:15:30Z"
    }
  },
  "pagination": null,
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2024-01-15T10:30:00Z",
    "version": "v1.2.0"
  }
}

Error Response

API error response format
{ "status": "error", "error": { "code": 404, "message": "User not found", "details": "No user exists with the provided ID", "timestamp": "2024-01-15T10:30:00Z" }, "data": null }