Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › APIs

Debugging JSON, JWT, SQL, Regex, Timestamps and URLs: Six Checks That Find the Fault

By Freedom251 Team · · 9 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When an API or integration fails, identify the failing layer before changing code. Check whether the payload parses and matches its contract, whether a token is actually trusted, whether a timestamp uses the right unit, whether SQL returns the intended rows, whether a regular expression behaves in its destination engine, and whether the client sent the URL you think it sent. These six checks turn vague errors into testable differences between expected and actual behavior.

Start by locating the failure layer

Debugging becomes slower when formatting, decoding or re-running a request is treated as proof that the underlying data is correct. A formatter can show that text is readable; it cannot prove that an API accepts the resulting shape. A JWT decoder can display claims; it cannot authenticate the signer. A pretty SQL query can still multiply rows. A URL that looks right in source code can be changed by encoding rules before it reaches the server.

As an Amazon Associate I earn from qualifying purchases.

Use the following comparison to decide what each tool can and cannot establish:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Check Primary failure layer Inspection can show Inspection cannot prove
JSON Syntax and data shape Whether text parses and what type it produces Whether the parsed value satisfies the API contract
JWT Token structure, trust and authorization Header and payload contents Valid signature, issuer, audience, expiry or authorization
Timestamps Unit and timezone interpretation Numeric value and converted date That the producer and consumer agreed on seconds or milliseconds
SQL Query semantics and cardinality Query text, parameters and returned rows That joins, filters and null handling match your intended result
Regex Pattern syntax and matching mode Matches for supplied fixtures Behavior in a different engine or on untested input
URL Encoding and request construction Parsed components and parameter values What a server received unless the actual request is inspected

For every investigation, save a redacted input, the expected result, the actual result, selected options and the runtime or database version. A small fixture file or local script makes the diagnosis repeatable instead of dependent on one browser observation.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

1. JSON: valid syntax is not a valid contract

JSON debugging has three separate questions: can the text be parsed, what value type did parsing produce, and does that value match the endpoint’s schema? Confusing those questions explains the common error, “Why is my JSON valid but my API still failing?”

Check parsing first

  1. Capture the exact response or request body before any formatter changes whitespace or escaping.
  2. Parse it with the same language and library used by the application.
  3. Record whether parsing returns an object, array, string, number, boolean or null.

Formatting only improves readability. Syntax validation catches missing commas, unmatched braces, invalid quotes and other parse errors. It does not check required properties, allowed values or numeric ranges.

Check the shape and types

A frequent failure is accidental double encoding. An object serialized twice may arrive as a JSON string whose contents happen to look like an object. The parser then returns a string, not an object, so property access and schema validation fail. Also check for an array-versus-object mismatch, missing properties, explicit null, and numbers represented as text such as "42" instead of 42.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not “repair” such payloads by deleting every backslash. Backslashes are legitimate inside strings, including escaped quotes, newline characters and regular-expression text. Remove an escaping layer only after you have established that an extra serialization step created it.

Compare against the endpoint contract

Write down the expected top-level type and each required field, then compare it with the parsed value. A payload can be perfectly valid JSON and still be rejected because a field is absent, has the wrong case, uses null where a value is required, or contains a string where the contract requires a number. Keep both the raw text and parsed representation in your debugging record.

Rank #2
Sale
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

2. JWT: decoding is inspection, not authentication

A JWT payload is designed to be readable after base64url decoding. Readability does not prove that the token was issued by a trusted party, has not been altered, or grants access to this application. Treat browser decoders as inspection tools and perform acceptance checks on the server with trusted keys and configured policy.

Validate the token structure

  1. Confirm the token has the expected compact serialized structure and can be split into its encoded sections.
  2. Base64url-decode the JOSE header.
  3. Verify that the decoded header is a valid JSON object.
  4. Apply the configured algorithm policy rather than accepting an algorithm selected by the token.
  5. Verify the signature with a trusted key.
  6. Check expiration, issuer and, where applicable, audience and application-specific claims.

RFC 7519, section 7.2, states: “If any of the listed steps fail, then the JWT MUST be rejected — that is, treated by the application as an invalid input.” A decoded payload that contains an apparently sensible user ID is therefore not evidence of authentication.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep inspection separate from acceptance

Use only synthetic or redacted tokens in online or browser-based decoders. Never paste a live credential into a third-party tool. In production, configure the verifier with trusted signing keys, accepted algorithms, the expected issuer, the expected audience when your application uses one, and an expiration policy. Log the reason for rejection without logging the complete token.

Distinguish claims from permissions

Even a correctly signed token can be unauthorized for a particular API. Signature verification establishes integrity and signer trust; issuer, audience, expiry and application rules establish whether this service should accept it. A token can pass one check and fail another, so record each result separately.

3. Timestamps: settle seconds versus milliseconds before changing timezones

Many apparent date errors are unit errors. JWT NumericDate values are expressed in seconds, while JavaScript date constructors commonly expect milliseconds. Treat the unit as part of the data contract, not something inferred solely from how many digits a number has.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Normalize before comparing

  1. Preserve the original value exactly as received.
  2. Read the producer’s documentation or schema to identify its unit.
  3. Convert both values to a common representation, preferably UTC.
  4. Compare the normalized instants, then format them for display in the desired timezone.

For a JWT exp value, multiply seconds by 1,000 when constructing a JavaScript Date. Conversely, do not divide a JavaScript millisecond timestamp unless the receiving contract explicitly requires seconds. Digit count is only a hint: future dates, truncated values and non-Unix formats can make heuristics misleading.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Separate instant, timezone and display

First determine whether the numeric instant is correct. Only then investigate timezone rendering. A correct UTC instant can appear different on two machines because each formats it in local time. Keep the raw number, documented unit, normalized UTC value and displayed local value in the fixture record.

4. SQL: inspect joins, filters, nulls and bindings

When a query returns duplicate, missing or unexpected rows, formatting the SQL is rarely enough. Investigate the relationship between expected cardinality and actual rows, then examine joins, filter placement, null behavior, parameter binding and database dialect.

Explain the expected cardinality

  1. State whether the result should contain zero or one row, one row per parent, or many rows per parent.
  2. Run the query with a small, known dataset and record the actual row count.
  3. Inspect each join key for uniqueness and nulls.
  4. Temporarily project the key columns from both sides of each join to identify where multiplication begins.
  5. Check whether a filter belongs in the join condition or in the WHERE clause, especially for outer joins.

A one-to-many join legitimately produces multiple rows for one parent. If the application expects one row, aggregate, constrain the relationship or change the result mapping deliberately; do not hide the symptom with an arbitrary DISTINCT.

Check null semantics

Comparisons with NULL do not behave like comparisons with ordinary values. A predicate such as column = NULL does not match null rows; use the dialect’s null test. Also verify whether a filter applied after a left join unintentionally removes rows that were supposed to remain unmatched.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Keep parameters separate from SQL text

Use parameterized queries so values are bound independently of the statement. Placeholder syntax depends on the client and database interface. Microsoft documentation shows named placeholders such as :user_id; PostgreSQL commonly uses positional placeholders such as $1; question-mark placeholders are used by other interfaces. Use one style consistently within a statement and confirm that the driver binds parameters in the order or names you expect.

Check the destination dialect

Functions, quoting rules, case sensitivity and placeholder behavior vary by database. Record the database engine, version, generated SQL and bound values (with secrets redacted). A query that works in a local dialect can fail or return different results after migration.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

5. Regex: test the destination engine and matching mode

A regular expression is not a universal language. JavaScript and other engines differ in supported syntax, Unicode behavior and flags. A pattern that works in a tester may fail in the application because the tester used another engine or because the application requests only the first match.

Build representative fixtures

  1. Create positive examples that must match.
  2. Create negative examples that must not match.
  3. Add boundary cases: empty input, leading or trailing text, Unicode characters, line breaks and very long input where relevant.
  4. Run the fixtures in the same language, engine and flags used in production.

Check anchors, escaping and case sensitivity. Decide explicitly whether the pattern should match a substring or the entire input. Verify global versus first-match behavior; a global search can return several matches while a single-match API returns only one.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Watch performance and portability

Some patterns require extensive backtracking and can stall a browser tab when given crafted or simply long input. Test realistic maximum lengths and reject or constrain input before matching when appropriate. If a pattern is shared between services, document the engine-specific features it uses instead of assuming portability.

Best Value
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

6. URLs: preserve structure and query semantics

Debug a changed URL by separating its scheme, host, path, query and fragment before editing anything. Encoding the entire URL as one value can destroy delimiters that carry structure.

Inspect each component

  1. Parse the original URL into scheme, host, path, query and fragment.
  2. Encode individual parameter names and values, not the complete URL.
  3. Preserve repeated keys when the API allows them.
  4. Inspect the final request emitted by the client, including redirects if relevant.
  5. Compare the server’s received query with the intended parameters.

Use APIs such as getAll when repeated keys matter; a single-value accessor may silently discard additional values. In form-style parsing, a literal plus sign can be interpreted as a space, while an encoded plus sign, %2B, represents the plus character. Encode the value according to the server’s expected rules.

Remember the fragment boundary

The fragment follows # and is handled by the client; it is not sent as part of the HTTP request query. Putting an API parameter after the fragment therefore does not send that parameter to the server. Keep server parameters in the query component and client-only state in the fragment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make every diagnosis reproducible

Once the failing layer is identified, preserve enough evidence for another person to reproduce it. For each of the six checks, retain:

  • A redacted raw input and the parsed or normalized representation.
  • The expected result and the actual result.
  • Selected options: schema version, JWT policy, timezone, regex flags or URL parser behavior.
  • The runtime, library, database dialect and version.
  • The smallest fixture that still demonstrates the failure.

A local script or fixture pack is more reliable than repeatedly copying values into a browser. It also prevents a fix in one layer from masking a separate defect in another. The goal is not merely to make one request pass, but to prove which contract, trust decision, unit conversion or matching rule changed.

A practical order for triage

When several symptoms appear together, use this order:

  1. Capture the exact request and response, including raw body and URL.
  2. Parse JSON and verify its top-level type and required shape.
  3. If authentication is involved, verify the JWT with trusted keys and claim policy; do not rely on decoded text.
  4. Normalize timestamp units and compare UTC instants.
  5. Run the SQL with recorded parameters, checking cardinality, joins and nulls.
  6. Execute regex fixtures in the destination engine with production flags.
  7. Parse the emitted URL and compare repeated keys, encoded values and fragment placement.
  8. Save the fixture, environment and result so the fix can be rerun.

This sequence moves from representation and trust to interpretation and behavior. It avoids changing code blindly and makes the next failure easier to classify.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

APIsDebuggingJSONJWTregular expressionsSQLtimestampsURLs

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.