Instant GSON
暫譯: 即時 GSON

Sandeep Kumar Patel

  • 出版商: Packt Publishing
  • 出版日期: 2013-09-13
  • 售價: $1,250
  • 貴賓價: 9.5$1,188
  • 語言: 英文
  • 頁數: 60
  • 裝訂: Paperback
  • ISBN: 1783282037
  • ISBN-13: 9781783282036
  • 海外代購書籍(需單獨結帳)

商品描述

Learn to create JSON data from Java objects and implement them in an application with the GSON library

Overview

  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results
  • Convert JAVA Objects to JSON representation and vice versa
  • Learn about the Field Exclusion strategy
  • Write your own JSON converter

In Detail

GSON is a specialized Java-based library for handling JSON data, developed by Google. GSON demonstrates an efficient use of CPU time, memory efficiency, the library, and developer productivity. This book will help you implement GSON in your Java project.

Instant GSON is a practical, hands-on guide that provides you with all the implementation features of the GSON API through coded examples, which will help you take advantage of the real power that is behind the GSON API, and give you a good grounding to use it in your projects.

Instant GSON starts with an introduction to the JSON data format and GSON library. It will take you through the configuration steps required to set up a GSON-based Java project. You will learn about the top features of the GSON library, which includes handling generic type and nested class objects in Java, implementing versioning support, exclusion strategies, and pretty printing. At the end of the book you will find some useful references to articles, blogs, and active communities.

What you will learn from this book

  • Convert Java objects to and from JSON
  • Handle generic and null java objects
  • Maintain different versions of serialized JSON
  • Alter the name of fields when serializing
  • Creating user defined annotation to remove fields while serializing
  • Learn about the implementation of GSON in web applications

Approach

Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks. Instant GSON is a practical, hands-on guide that will explain the implementation features of the GSON API through examples with code.

Who this book is written for

Instant GSON is for software developers who are new to the GSON library, and who are looking to explore it in depth. You should have some experience in Java programming and Java POJO classes.

商品描述(中文翻譯)

學習如何從 Java 物件創建 JSON 數據,並使用 GSON 函式庫在應用程式中實現它

概述
- 立即學習新知!一本短小、快速、專注的指南,提供即時結果
- 將 JAVA 物件轉換為 JSON 表示,反之亦然
- 了解欄位排除策略
- 編寫自己的 JSON 轉換器

詳細內容
GSON 是一個專門用於處理 JSON 數據的 Java 基礎函式庫,由 Google 開發。GSON 展示了 CPU 時間的高效使用、內存效率、函式庫和開發者生產力。本書將幫助您在 Java 專案中實現 GSON。

《Instant GSON》是一本實用的、動手操作的指南,通過編碼範例提供 GSON API 的所有實現特性,幫助您充分利用 GSON API 背後的真正力量,並為您在專案中使用它打下良好的基礎。

《Instant GSON》首先介紹 JSON 數據格式和 GSON 函式庫。它將帶您了解設置基於 GSON 的 Java 專案所需的配置步驟。您將學習 GSON 函式庫的主要特性,包括處理 Java 中的泛型類型和嵌套類別物件、實現版本控制支持、排除策略和美化輸出。在書的最後,您會找到一些有用的參考資料,包括文章、部落格和活躍的社群。

您將從本書中學到的內容
- 將 Java 物件轉換為 JSON 及反向轉換
- 處理泛型和空的 Java 物件
- 維護不同版本的序列化 JSON
- 在序列化時更改欄位名稱
- 創建用戶自定義註解以在序列化時移除欄位
- 了解 GSON 在網頁應用程式中的實現

方法
掌握一項新技術,了解它是什麼以及它能為您做什麼,然後開始使用最重要的特性和任務。《Instant GSON》是一本實用的、動手操作的指南,將通過帶有代碼的範例解釋 GSON API 的實現特性。

本書的讀者對象
《Instant GSON》適合對 GSON 函式庫不熟悉的軟體開發者,並希望深入探索它。您應該具備一定的 Java 程式設計和 Java POJO 類別的經驗。