Copyright/license headers
The following changes are included: - Delete per-file license notices at the top of each file. - Delete the first paragraph of LICENSE-MIT (an inaccurate pseudo-copyright line), leaving only the text of the MIT license. Nothing about the license of Serde code has changed, only our understanding of how to correctly communicate the license has changed. This mirrors an equivalent change being applied in the rust-lang/rust repository.
This commit is contained in:
parent
ca7c5b406b
commit
4d5234c8d9
@ -1,5 +1,3 @@
|
||||
Copyright (c) 2014 The Rust Project Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! Deserialize JSON data to a Rust data structure.
|
||||
|
||||
use std::io;
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! When serializing or deserializing JSON goes wrong.
|
||||
|
||||
use std::error;
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use std::io;
|
||||
|
||||
pub struct LineColIterator<I> {
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! # Serde JSON
|
||||
//!
|
||||
//! JSON is a ubiquitous open-standard format that uses human-readable text to
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
/// Construct a `serde_json::Value` from a JSON literal.
|
||||
///
|
||||
/// ```rust
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! A map of String to serde_json::Value.
|
||||
//!
|
||||
//! By default the map is backed by a [`BTreeMap`]. Enable the `preserve_order`
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use error::Error;
|
||||
use serde::de::{self, Unexpected, Visitor};
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use std::ops::Deref;
|
||||
use std::{char, cmp, io, str};
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! Serialize a Rust data structure into JSON data.
|
||||
|
||||
use std::fmt;
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::fmt;
|
||||
use std::slice;
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
use super::Value;
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use std::fmt;
|
||||
use std::ops;
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The Value enum, a loosely typed way of representing any valid JSON value.
|
||||
//!
|
||||
//! # Constructing JSON
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use super::Value;
|
||||
|
||||
fn eq_i64(value: &Value, other: i64) -> bool {
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use serde::ser::Impossible;
|
||||
use serde::{self, Serialize};
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
extern crate compiletest_rs as compiletest;
|
||||
|
||||
#[test]
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(/*=============================================]
|
||||
#![=== Serde test suite requires a nightly compiler. ===]
|
||||
#![====================================================*/)]
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
macro_rules! json_str {
|
||||
([]) => {
|
||||
"[]"
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
extern crate serde_json;
|
||||
|
||||
use serde_json::{from_str, Value};
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![cfg(not(feature = "preserve_order"))]
|
||||
|
||||
extern crate serde;
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![cfg(not(feature = "preserve_order"))]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, unreadable_literal))]
|
||||
#![cfg_attr(feature = "trace-macros", feature(trace_macros))]
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
error: unexpected end of macro invocation
|
||||
--> $DIR/missing_colon.rs:13:5
|
||||
|
|
||||
13 | json!({ "a" });
|
||||
| ^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
||||
|
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
--> $DIR/missing_colon.rs:5:5
|
||||
|
|
||||
5 | json!({ "a" });
|
||||
| ^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
||||
|
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
error: unexpected end of macro invocation
|
||||
--> $DIR/missing_value.rs:13:5
|
||||
|
|
||||
13 | json!({ "a" : });
|
||||
| ^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
||||
|
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
--> $DIR/missing_value.rs:5:5
|
||||
|
|
||||
5 | json!({ "a" : });
|
||||
| ^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
||||
|
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
error[E0425]: cannot find value `x` in this scope
|
||||
--> $DIR/not_found.rs:13:19
|
||||
|
|
||||
13 | json!({ "a" : x });
|
||||
| ^ not found in this scope
|
||||
--> $DIR/not_found.rs:5:19
|
||||
|
|
||||
5 | json!({ "a" : x });
|
||||
| ^ not found in this scope
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
error: unexpected end of macro invocation
|
||||
--> $DIR/parse_expr.rs:13:5
|
||||
|
|
||||
13 | json!({ "a" : ~ });
|
||||
| ^^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
||||
|
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
--> $DIR/parse_expr.rs:5:5
|
||||
|
|
||||
5 | json!({ "a" : ~ });
|
||||
| ^^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
||||
|
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
error[E0609]: no field `s` on type `&'static str`
|
||||
--> $DIR/parse_key.rs:13:16
|
||||
|
|
||||
13 | json!({ "".s : true });
|
||||
| ^
|
||||
--> $DIR/parse_key.rs:5:16
|
||||
|
|
||||
5 | json!({ "".s : true });
|
||||
| ^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2018 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
error: no rules expected the token `=>`
|
||||
--> $DIR/unexpected_after_array_element.rs:13:18
|
||||
|
|
||||
13 | json!([ true => ]);
|
||||
| ^^ no rules expected this token in macro call
|
||||
--> $DIR/unexpected_after_array_element.rs:5:18
|
||||
|
|
||||
5 | json!([ true => ]);
|
||||
| ^^ no rules expected this token in macro call
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2018 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
error: no rules expected the token `=>`
|
||||
--> $DIR/unexpected_after_map_entry.rs:13:23
|
||||
|
|
||||
13 | json!({ "k": true => });
|
||||
| ^^ no rules expected this token in macro call
|
||||
--> $DIR/unexpected_after_map_entry.rs:5:23
|
||||
|
|
||||
5 | json!({ "k": true => });
|
||||
| ^^ no rules expected this token in macro call
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
error: no rules expected the token `:`
|
||||
--> $DIR/unexpected_colon.rs:13:13
|
||||
|
|
||||
13 | json!({ : true });
|
||||
| ^ no rules expected this token in macro call
|
||||
--> $DIR/unexpected_colon.rs:5:13
|
||||
|
|
||||
5 | json!({ : true });
|
||||
| ^ no rules expected this token in macro call
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
// Copyright 2017 Serde Developers
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
error: no rules expected the token `,`
|
||||
--> $DIR/unexpected_comma.rs:13:17
|
||||
|
|
||||
13 | json!({ "a" , "b": true });
|
||||
| ^ no rules expected this token in macro call
|
||||
--> $DIR/unexpected_comma.rs:5:17
|
||||
|
|
||||
5 | json!({ "a" , "b": true });
|
||||
| ^ no rules expected this token in macro call
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user