1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! A Rust implementation of SDMX-JSON (Statistical Data and Metadata eXchange)
//! using Serde.
//!
//! All JSON files are implemented with a top-level type, e.g
//! [`DataMesssage`][crate::data::DataMessage],
//! [`MetadataMessage`][crate::metadata::MetadataMessage],
//! and [`StructureMessage`][crate::structure::StructureMessage]. Likewise,
//! all of these types can be deserialized from the following types:
//!
//! - a [`&str`] through implementing the [`FromStr`][std::str::FromStr] trait,
//! which internally calls [`serde_json::from_str()`][serde_json::from_str]
//! - a [`&[u8]`][slice] through implementing `TryFrom<&u8>`,
//! which internally calls [`serde_json::from_slice()`][serde_json::from_slice]
//! - a [`Value`][serde_json::Value] through implementing `TryFrom<Value>`,
//! which internally calls [`serde_json::from_value()`][serde_json::from_value]
//! - any type that implements [`Read`](`std::io::Read`) by directly calling
//! [`serde_json::from_reader()`][serde_json::from_reader]
/// SDMX-JSON Data Message format, 2.0.0 (aligned with SDMX 3.0.0)
///
/// This module implements [SDMX-JSON Data Message 2.0.0][data].
/// The Data Message format allows for exchanging contextual statistics
/// data via the JSON file format.
///
/// JSON files in this format are implemented in the top-level root type,
/// [`DataMessage`][crate::data::DataMessage].
/// They can be deserialized from a [`&str`], a [`&[u8]`][slice],
/// and a [`Value`][serde_json::Value].
///
/// [data]: <https://github.com/sdmx-twg/sdmx-json/tree/master/data-message>
/// SDMX-JSON Metadata Message format, 2.0.0 (aligned with SDMX 3.0.0)
///
/// This module implements [SDMX-JSON Metadata Message 2.0.0][metadata].
/// The Metadata Message format includes information that describes
/// the statistical data itself.
///
/// JSON files in this format are implemented in the top-level root type,
/// [`MetadataMessage`][crate::metadata::MetadataMessage].
/// They can be deserialized from a [`&str`], a [`&[u8]`][slice],
/// and a [`Value`][serde_json::Value].
///
/// [metadata]: <https://github.com/sdmx-twg/sdmx-json/tree/master/metadata-message>
/// Common foundational types shared between the message formats
/// SDMX-JSON Structure Message format, 2.0.0 (aligned with SDMX 3.0.0)
///
/// This module implements [SDMX-JSON Structure Message 2.0.0][structure].
/// The Structure Message format is used for describing objects in
/// RESTful API services to make data more easily discoverable
/// and consumable.
///
/// JSON files in this format are implemented in the top-level root type,
/// [`StructureMessage`][crate::structure::StructureMessage].
/// They can be deserialized from a [`&str`], a [`&[u8]`][slice],
/// and a [`Value`][serde_json::Value].
///
/// [structure]: https://github.com/sdmx-twg/sdmx-json/tree/master/structure-message