Files
greptimedb/datatypes/json/index.html
2025-12-23 10:07:07 +00:00

4 lines
8.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Data conversion between greptimes StructType and Json"><title>datatypes::json - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="datatypes" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module json</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../datatypes/index.html">datatypes</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module json</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate datatypes</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">datatypes</a></div><h1>Module <span>json</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/datatypes/json.rs.html#15-2280">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Data conversion between greptimes StructType and Json</p>
<p>The idea of this module is to provide utilities to convert serde_json::Value to greptimes StructType and vice versa.</p>
<p>The struct will carry all the fields of the Json object. We will not flatten any json object in this implementation.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="value/index.html" title="mod datatypes::json::value">value</a></dt></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.JsonContext.html" title="struct datatypes::json::JsonContext">Json<wbr>Context</a></dt><dd>Context for JSON encoding/decoding that tracks the current key path</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.JsonStructureSettings.html" title="enum datatypes::json::JsonStructureSettings">Json<wbr>Structure<wbr>Settings</a></dt><dd>The configuration of JSON encoding</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.decode_list_with_context.html" title="fn datatypes::json::decode_list_with_context">decode_<wbr>list_<wbr>with_<wbr>context</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Decode a list value to JSON array</dd><dt><a class="fn" href="fn.decode_list_with_settings.html" title="fn datatypes::json::decode_list_with_settings">decode_<wbr>list_<wbr>with_<wbr>settings</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Decode a ListValue that was encoded with current settings back into a fully structured ListValue</dd><dt><a class="fn" href="fn.decode_primitive_value.html" title="fn datatypes::json::decode_primitive_value">decode_<wbr>primitive_<wbr>value</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Decode primitive value to JSON</dd><dt><a class="fn" href="fn.decode_struct_with_context.html" title="fn datatypes::json::decode_struct_with_context">decode_<wbr>struct_<wbr>with_<wbr>context</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Decode a structured value to JSON object</dd><dt><a class="fn" href="fn.decode_struct_with_settings.html" title="fn datatypes::json::decode_struct_with_settings">decode_<wbr>struct_<wbr>with_<wbr>settings</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Decode a StructValue that was encoded with current settings back into a fully structured StructValue</dd><dt><a class="fn" href="fn.decode_unstructured_raw_struct.html" title="fn datatypes::json::decode_unstructured_raw_struct">decode_<wbr>unstructured_<wbr>raw_<wbr>struct</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Helper function to decode a struct that was encoded with UnstructuredRaw settings</dd><dt><a class="fn" href="fn.decode_unstructured_value.html" title="fn datatypes::json::decode_unstructured_value">decode_<wbr>unstructured_<wbr>value</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Decode unstructured value (stored as string)</dd><dt><a class="fn" href="fn.decode_value_with_context.html" title="fn datatypes::json::decode_value_with_context">decode_<wbr>value_<wbr>with_<wbr>context</a></dt><dd>Main decoding function with key path tracking</dd><dt><a class="fn" href="fn.encode_json_array_with_context.html" title="fn datatypes::json::encode_json_array_with_context">encode_<wbr>json_<wbr>array_<wbr>with_<wbr>context</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.encode_json_object_with_context.html" title="fn datatypes::json::encode_json_object_with_context">encode_<wbr>json_<wbr>object_<wbr>with_<wbr>context</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.encode_json_value_with_context.html" title="fn datatypes::json::encode_json_value_with_context">encode_<wbr>json_<wbr>value_<wbr>with_<wbr>context</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Helper function to encode a JSON value to a Value and determine its ConcreteDataType with context</dd><dt><a class="fn" href="fn.encode_json_with_context.html" title="fn datatypes::json::encode_json_with_context">encode_<wbr>json_<wbr>with_<wbr>context</a></dt><dd>Main encoding function with key path tracking</dd><dt><a class="fn" href="fn.try_convert_to_expected_type.html" title="fn datatypes::json::try_convert_to_expected_type">try_<wbr>convert_<wbr>to_<wbr>expected_<wbr>type</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Helper function to try converting a value to an expected type</dd></dl></section></div></main></body></html>