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 Pragmatic topics Top

Razor54672
The answer to 3rd Problem of Chapter 5 (Making Choices) of “Practical Programming, Third Edition” seems incorrect in the given answer ke...
New
ianwillie
Hello Brian, I have some problems with running the code in your book. I like the style of the book very much and I have learnt a lot as...
New
yulkin
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
New
sdmoralesma
Title: Web Development with Clojure, Third Edition - migrations/create not working: p159 When I execute the command: user=> (create-...
New
jdufour
Hello! On page xix of the preface, it says there is a community forum "… for help if your’re stuck on one of the exercises in this book… ...
New
New
brian-m-ops
#book-python-testing-with-pytest-second-edition Hi. Thanks for writing the book. I am just learning so this might just of been an issue ...
New
jskubick
I found an issue in Chapter 7 regarding android:backgroundTint vs app:backgroundTint. How to replicate: load chapter-7 from zipfile i...
New
brunogirin
When running tox for the first time, I got the following error: ERROR: InterpreterNotFound: python3.10 I realised that I was running ...
New
gorkaio
root_layout: {PentoWeb.LayoutView, :root}, This results in the following following error: no “root” html template defined for PentoWeb...
New

Other popular topics Top

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
siddhant3030
I’m thinking of buying a monitor that I can rotate to use as a vertical monitor? Also, I want to know if someone is using it for program...
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
AstonJ
poll poll Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New
AstonJ
I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl: The Ser...
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
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
husaindevelop
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
CommunityNews
A Brief Review of the Minisforum V3 AMD Tablet. Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New

Latest in PragProg

View all threads ❯