package Ġme . k ent k awa . bg g pull er . xml . parser Ċ Ċ import Ġcom . fasterxml . jackson . core . Json Parser Ċ import Ġcom . fasterxml . jackson . databind . Deserialization Context Ċ import Ġcom . fasterxml . jackson . databind . de ser . std . Std Deserializer Ċ import Ġme . k ent k awa . bg g pull er . model . B gg Collection Ċ import Ġjava . lang . IllegalStateException Ċ Ċ class ĠB gg Collection Parser Ġ: ĠStd Deserializer < B gg Collection >( B gg Collection :: class . java ) Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġdeserialize ( p : ĠJson Parser ?, Ġctxt : ĠDeserial ization Context ?): ĠB gg Collection Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġjson Ġ= Ġctxt ?. read Tree ( p ) Ġ?: Ġthrow ĠIllegalStateException (" cannot Ġread Ġtree ") ĊĠĠĠĠĠĠĠ Ġreturn ĠB gg Collection ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġjson . get (" total items "). as Int (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhandle Possible List ( json . get (" item "), Ġ:: read Collection Entry ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ } Ċ