| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_JSON_JSON_VALUE_CONVERTER_H_ | 5 #ifndef BASE_JSON_JSON_VALUE_CONVERTER_H_ |
| 6 #define BASE_JSON_JSON_VALUE_CONVERTER_H_ | 6 #define BASE_JSON_JSON_VALUE_CONVERTER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
| 15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
| 16 #include "base/string16.h" | 16 #include "base/strings/string16.h" |
| 17 #include "base/strings/string_piece.h" | 17 #include "base/strings/string_piece.h" |
| 18 #include "base/values.h" | 18 #include "base/values.h" |
| 19 | 19 |
| 20 // JSONValueConverter converts a JSON value into a C++ struct in a | 20 // JSONValueConverter converts a JSON value into a C++ struct in a |
| 21 // lightweight way. | 21 // lightweight way. |
| 22 // | 22 // |
| 23 // Usage: | 23 // Usage: |
| 24 // For real examples, you may want to refer to _unittest.cc file. | 24 // For real examples, you may want to refer to _unittest.cc file. |
| 25 // | 25 // |
| 26 // Assume that you have a struct like this: | 26 // Assume that you have a struct like this: |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 | 518 |
| 519 private: | 519 private: |
| 520 ScopedVector<internal::FieldConverterBase<StructType> > fields_; | 520 ScopedVector<internal::FieldConverterBase<StructType> > fields_; |
| 521 | 521 |
| 522 DISALLOW_COPY_AND_ASSIGN(JSONValueConverter); | 522 DISALLOW_COPY_AND_ASSIGN(JSONValueConverter); |
| 523 }; | 523 }; |
| 524 | 524 |
| 525 } // namespace base | 525 } // namespace base |
| 526 | 526 |
| 527 #endif // BASE_JSON_JSON_VALUE_CONVERTER_H_ | 527 #endif // BASE_JSON_JSON_VALUE_CONVERTER_H_ |
| OLD | NEW |