Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Query
  • Access management
  • Pricing policy
    • SDK
      • Overview
      • Authentication
      • YQL and JSON type mapping
    • Apache Airflow™
  • Integration
  • Audit Trails events
  • FAQ

In this article:

  • Scalar types
  • Complex types
  • Optional types
  • Containers
  • Special types
  1. Reference
  2. HTTP API
  3. YQL and JSON type mapping

Correspondence of YQL and JSON types

Written by
Yandex Cloud
Updated at February 10, 2023
  • Scalar types
  • Complex types
  • Optional types
  • Containers
  • Special types

Below are the rules for converting YQL types to JSON results.

Scalar typesScalar types

YQL type JSON type Example in JSON
Int8, Int16, Int32
Uint8, Uint16, and Uint32
Integer 647713
Int64, Uint64 Integer if the value is in the range [-(253-1) ... (253-1)], or else String -9007199254740991
"-9007199254740991"
"10446744073709551615"
Bool Bool True
Float, Double Double
NaN, and Inf (written to String)
7,88731023
"nan"
"inf"
Decimal String "45,23410083"
String A string in Base64 encoding (a bytes array of strings) "0LDQsdGB0ZHQmWFiYw=="
Utf8 String "String text"

Complex typesComplex types

YQL type JSON type Example in JSON
Json, JsonDocument String (the entire node is inserted as a string) "{\"a\":[1,2,3]}"
Date, Datetime, and Timestamp String (encoded in ISO-8601) "2022-02-09"
"2021-01-01T14:05:43Z"
"2022-02-13T12:26:52.879622Z"
Interval String (encoded in ISO-8601) "PT1M"

Optional typesOptional types

YQL type JSON type Example in JSON
Optional [] array [] — Nothing [10] — Just 10

Optional nesting is maintained: Just(Just(Just(10))) — [[[10]]].

ContainersContainers

YQL type JSON type Example in JSON
List<Type> Array [1,2,3,4]
Dict<KeyType, ValueType> Array of arrays [[key1, value1], [key2, value2]]
Set<KeyType> Array [key_value1, key_value2]
Tuple<Type1, Type2> Array [element1, element2, ..]
[] — Empty tuple
Struct<Name:Utf8,Age:Int32> Object {} { "Name": "John", "Age": 128 }
Variant<Type1, Type2> with a tuple An array of two items: [filled_index, Value_by_index] Variant<Utf8, Int32> Variant(64563, 1) — [1, 64563]
Variant<value:Int32,error:String> with a structure An array of two items: [filled_member_name, Value] Variant<complete:Bool,error:Utf8>
Variant(false, "complete") — ["complete", false]

Special typesSpecial types

YQL type JSON type
Void, Null Null
EmptyList, EmptyDict []
Tagged The original type is maintained, the user tag name is lost

Was the article helpful?

Previous
get-query-results
Next
Apache Airflow™
© 2025 Direct Cursus Technology L.L.C.