Error converting value "true" to type 'System.Boolean'. Path 'items[0].id', line 1, position 10.: what it means and how to fix it

TL;DR: Validate locally, fix the first real error, validate again (no upload).

Troubleshoot Error converting value "true" to type 'System.Boolean'. Path 'items[0].id', line 1, position 10. quickly and validate JSON locally (no upload).

What the error means

Error converting value "true" to type 'System.Boolean'. Path 'items[0].id', line 1, position 10. usually means the JSON was parsed, but the value at some path does not match the type/schema your code expects (for example: array vs object, number vs string, null vs non-nullable).

Most common real-world causes

  • Your code expects a different type (number vs string, bool vs string, object vs array).
  • A field is null/missing but your type is non-nullable (or your code assumes it is always present).
  • The API response shape changed (or differs by environment / feature flags).
  • You are deserializing the wrong endpoint or the response is an error payload with a different schema.
  • Date/UUID/IP formats don't match what the deserializer expects.

Fast debugging steps

  • Parse into a generic JSON type first (Value/JToken/JsonElement/JsonNode) and inspect the actual shape at the failing path.
  • Confirm whether the field is an array vs object and whether scalars are strings vs numbers.
  • Add defensive handling for null/missing fields (optional types, defaults, or custom converters).
  • Log the raw response (or a redacted sample) and validate it locally to rule out truncation or hidden prefixes.
  • Update DTO/types to match the real response shape (or use a more flexible model for unstable fields).

Code example (csharp)

using System;
using Newtonsoft.Json.Linq;

// Parse to JToken first to inspect type mismatches quickly
var token = JToken.Parse(text);
Console.WriteLine(token.Type);

// Then deserialize into your target type once the shape is confirmed
// var model = token.ToObject<MyDto>();

Fix without uploading data

If the JSON contains sensitive data, validate and fix it locally. No Upload Tools runs 100% in your browser.

Workflow: validate -> fix the first error -> validate again -> export/convert.

FAQ

Does this mean the JSON is invalid? Not necessarily. Many of these errors happen when the JSON is valid, but your code expects a different type/shape.

What is the fastest fix? Parse into a generic JSON type first (Value/JToken/JsonElement/JsonNode), inspect the failing path, then update your DTO/type (or add a converter) to match the real response.

Privacy & Security
All processing happens locally in your browser. Files are never uploaded.

Запрос из поиска

typeerror: must be str, not bool

  • Проверьте структуру и типы входных данных.
  • Найдите позицию ошибки и изолируйте минимальный пример.
  • Сверьте экранирование, разделители и кодировку.
  • Примените фикс и повторите проверку на реальном payload.

Quick fix checklist

  • Reproduce the error on a minimal input.
  • Check type/format and field mapping.
  • Apply the smallest safe fix.
  • Validate on production-like payload.

Related by intent

Useful follow-up pages selected from real search impressions and no-click opportunities.

No-click fix: csharp newtonsoft error converting true system boolean valueNo-click fix: csharp newtonsoft error converting true system int64 items 0 idNo-click fix: csharp newtonsoft error converting true system uri valueRelated fix: neighbor csharp csharp newtonsoft error converting true system boolean items 0 id workflows Related fix: neighbor csharp csharp newtonsoft error converting true system boolean items 0 id workflows Related fix: neighbor csharp csharp newtonsoft error converting true system boolean value workflows data Related fix: neighbor csharp csharp newtonsoft error converting true system int64 items 0 id workflows weRelated fix: neighbor csharp csharp newtonsoft error converting true system boolean value checklists dataRelated fix: neighbor csharp csharp newtonsoft error converting true system int64 items 0 id workflows anRelated fix: neighbor csharp csharp newtonsoft error converting true system int64 items 0 id checklists aRelated fix: neighbor node csharp newtonsoft error converting true system boolean value workflows data imRelated fix: neighbor node csharp newtonsoft error converting true system boolean value checklists data iRelated fix: neighbor csharp csharp newtonsoft error converting true system uri value workflows data impoRelated fix: neighbor csharp csharp newtonsoft error converting true system guid value checklists data imRelated fix: neighbor csharp csharp newtonsoft error converting 123 system int64 items 0 id workflows webRelated fix: neighbor csharp csharp newtonsoft error converting null system boolean user id workflows webRelated fix: neighbor csharp csharp newtonsoft error converting true system decimal user id workflows webRelated fix: neighbor csharp csharp newtonsoft error converting null system boolean user id checklists weRelated fix: neighbor csharp csharp newtonsoft error converting false system int64 items 0 id workflows wRelated fix: neighbor csharp csharp newtonsoft error converting null system decimal items 0 id runbooks w

Next pages to check

Closest crawled pages without impressions yet. Added to speed first-impression conversion.

neighbor csharp csharp newtonsoft error converting true system boolean items 0 id workflneighbor csharp csharp newtonsoft error converting true system boolean value checklists neighbor csharp csharp newtonsoft error converting true system boolean value workflows dneighbor csharp csharp newtonsoft error converting true system int64 items 0 id workflowneighbor csharp csharp newtonsoft error converting true system int64 items 0 id workflowneighbor csharp csharp newtonsoft error converting 123 system int64 items 0 id workflowsneighbor csharp csharp newtonsoft error converting 123 system int64 items 0 id workflowsneighbor csharp csharp newtonsoft error converting 2026 02 17 system boolean id workflowneighbor csharp csharp newtonsoft error converting infinity system int32 items 0 id runbneighbor csharp csharp newtonsoft error converting null system boolean user id checklistneighbor csharp csharp newtonsoft error converting null system boolean user id checklistneighbor csharp csharp newtonsoft error converting null system boolean user id checklistneighbor csharp csharp newtonsoft error converting null system boolean user id checklistneighbor csharp csharp newtonsoft error converting null system boolean user id runbooks neighbor csharp csharp newtonsoft error converting null system boolean user id troubleshneighbor csharp csharp newtonsoft error converting null system boolean user id workflowsneighbor csharp csharp newtonsoft error converting null system boolean user id workflowsneighbor csharp csharp newtonsoft error converting null system boolean user id workflows