pm9999

pm9999

Web Development with Clojure, Third Edition: name confusing and missing fn/var page 218/219

@svmbrown

(json/read-value json/keyword-keys-object-mapper)

json/keyword-keys-object-mapper doesn’t exist

We’ve required cheshire.core’s generate-string and parse-string functions for working
with converting between JSON and EDN, and we’ve imported the classes for
which we’ll need to implement the IResultSetReadColumn and ISQLValue protocols.

Where is generate-string and parse-string used?

We’ve implemented IResultSetReadColumn for Array, returning a Clojure vector,
and for PGObjects of type JSON and JSONB, returning a Clojure map.

By json/read-value? Can you clarify?

Then, we’ve written a helper function to-pg-json to convert maps and vectors
to PGObjects. We use this function in our implementations of ISQLValue for IPersistentMap
and IPersistentVector to convert them into JSONB for use in queries.

Can you clarify to-pg-json as it’s not in the code? Did it mean write-pg-object and the extend-protocl right afterwards?

Most Liked

zach

zach

I encountered the same issue and was able to fix it by updating my project.clj to use [metosin/muuntaja 0.6.8] instead of 0.6.7 (as instructed in the book).

It looks like that keyword-keys-object-mapper wasn’t a part of jsonista until its v0.3.5, which wasn’t a part of earlier muuntaja’s.

I cannot answer the rest of the issue, but it looks likely that the author hasn’t fully updated this section?

Popular Prag Prog topics Top

jamis
The following is cross-posted from the original Ray Tracer Challenge forum, from a post by garfieldnate. I’m cross-posting it so that the...
New
mikecargal
Title: Hands-on Rust: question about get_component (page 295) (feel free to respond. “You dug you’re own hole… good luck”) I have somet...
New
alanq
This isn’t directly about the book contents so maybe not the right forum…but in some of the code apps (e.g. turbo/06) it sends a TURBO_ST...
New
adamwoolhether
I’m not quite sure what’s going on here, but I’m unable to have to containers successfully complete the Readiness/Liveness checks. I’m im...
New
Charles
In general, the book isn’t yet updated for Phoenix version 1.6. On page 18 of the book, the authors indicate that an auto generated of ro...
New
oaklandgit
Hi, I completed chapter 6 but am getting the following error when running: thread 'main' panicked at 'Failed to load texture: IoError(O...
New
rainforest
Hi, I’ve got a question about the implementation of PubSub when using a Phoenix.Socket.Transport behaviour rather than channels. Before ...
New
jwandekoken
Book: Programming Phoenix LiveView, page 142 (157/378), file lib/pento_web/live/product_live/form_component.ex, in the function below: d...
New
tkhobbes
After some hassle, I was able to finally run bin/setup, now I have started the rails server but I get this error message right when I vis...
New
dtonhofer
@parrt In the context of Chapter 4.3, the grammar Java.g4, meant to parse Java 6 compilation units, no longer passes ANTLR (currently 4....
New

Other popular topics Top

PragmaticBookshelf
A PragProg Hero’s Journey with Brian P. Hogan @bphogan Have you ever worried that your only legacy will be in the form of legacy...
New
Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
AstonJ
This looks like a stunning keycap set :orange_heart: A LEGENDARY KEYBOARD LIVES ON When you bought an Apple Macintosh computer in the e...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
PragmaticBookshelf
A Hero’s Journey with Chris Pine @chrispine Chris Pine, author of Learn to Program, Third Edition, discusses his journey to beco...
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New

Latest in PragProg

View all threads ❯