conjure_serde/
lib.rs

1// Copyright 2018 Palantir Technologies, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//! Serde serializer and deserializer wrappers compatible with Conjure.
15//!
16//! # Examples
17//!
18//! ```
19//! use std::f64;
20//! use serde::Deserialize;
21//!
22//! let json = r#""Infinity""#;
23//! let mut deserializer = conjure_serde::json::ClientDeserializer::from_str(json);
24//! let value = f64::deserialize(&mut deserializer).unwrap();
25//! deserializer.end().unwrap();
26//! assert_eq!(value, f64::INFINITY);
27//! ```
28#![warn(clippy::all, missing_docs)]
29
30#[macro_use]
31mod ser;
32#[macro_use]
33mod de;
34
35pub mod json;
36pub mod smile;