Questions tagged [edn]

Extensible Data Notation, edn, is a subset of Clojure's data notation intended to be used as a data exchange format.

Rationale and initial spec are located at https://github.com/edn-format/edn.

57 questions
2
votes
1 answer

Call functions read from EDN files

I have an EDN configuration file in which the entries refer to existing functions, e.g.: :attribute-modules {:content {:class lohan.extractors.content/process} :schema {:class lohan.extractors.schema/process} …
kyrre
  • 626
  • 2
  • 9
  • 24
1
vote
1 answer

Web development with Clojure book: Swagger-ui not recognizing edn

I am working through Web Development with Clojure, Third edition, by Dmitri Sotnikov and Scott Brown. In Chapter 5, "Setting up for success" we add support for swagger-ui. On page 117, we are told that we should downgrade Swagger UI to get support…
Viswa V
  • 181
  • 1
  • 11
1
vote
2 answers

how to work with complex data in Clojure edn/map

(def dbSample { :person [{:person/id 1 :name "dan" :surname "stone" :joindate "01.06.2022" :experience :experience/starter :loyalitylevel :loyality-level/zero-one-years :worktime :worktime/internship :managers…
1
vote
2 answers

File core.clj is not under a source root error in intellij

I am using IntelliJ IDEA in a Clojure project, I just started but I get the message "File core.clj is not under a source root", the project has 2 folders: .idea and src, inside src I got the core.clj file in which showing the structure of the…
1
vote
0 answers

edn/read does not maintain the order of the sequence

I am using clojure library to read the edn file Now my data.edn file looks like this. {:mysites {:locations ["priorityLoc1" "priorityLoc2" "priorityLoc3"] :back-up ["backup1uri" "backup2uri"]} } Now when i use edn/read the map that get…
1
vote
3 answers

Can't execute main function 'run' with clojure cli tools - Deps and CLI Guide

I am doing the clojure cli tutorial from the official clojure site https://clojure.org/guides/deps_and_cli, but I come across this message when I want to run the following: $ clj -X hello/run Execution error (FileNotFoundException) at…
1
vote
1 answer

What are the uses of symbols like '$ % &' in EDN?

I am new to EDN and going through EDN spec - https://github.com/edn-format/edn What is the use of EDN symbols like '$ % &' and how can I make use of them while reading EDN in Clojure?
ppp456878
  • 155
  • 8
1
vote
1 answer

cljs.reader/read-string reads objects's content in random order

I don't understand why cljs.reader/read-string function reads my edn-file's content in a random order. Here is an example file content: {:data {:name-tit {:hu "Név" :en "Name"} :description-tit {:hu "Leírás" :en "Description"} …
1
vote
0 answers

Parsing EDN format in swift usinf MPEdn library

I am trying to parse EDN format using the MPEdn library. I have successfully added the MPEdn library to my project. But the problem is I am unable to parse the edn format in swift. I have parsed the EDN string using the parseString method of the…
Manish
  • 306
  • 4
  • 11
1
vote
1 answer

Can't eval/load-string clojure function from string

I need to read a clojure function from an edn file which outputs hiccup to generate html content. But I'm stuck at the part where the function needs to be evaluated. I receive the error message: java.lang.RuntimeException: Unable to resolve symbol:…
1
vote
0 answers

can the Datomic REST API return detailed error messages instead of "Server Error"?

I get an HTTP 500, with the generic message "Server Error", for any erroneous query or transaction submitted to the Datomic REST API. This occurs for a wide variety of problems: malformed EDN, attribute values with the wrong type, etc. Is there a…
rcrogers
  • 2,281
  • 1
  • 17
  • 14
0
votes
0 answers

How do I fix this error in with deps.edn file?

I have created a project called tutorial with a deps.edn file in it. I also have a core.cljs file in tutorial/src/appy. When I run the command clj -m cljs.main --compile appy.core --repl following a tutorial I get an error. Error building…
NGY
  • 96
  • 8
0
votes
3 answers

How to retrive in Clojure from a vector of maps (Elasticseach buckets) the doc_count of a given key

From a Clojure Elasticsearch aggregation query, I have a buckets vector of maps like the following where the key is a numerical identifier and the doc_count is the number of occurrences. :buckets [{:key 14768496, :doc_count 464} {:key 14761312,…
Andreas Guther
  • 422
  • 4
  • 7
0
votes
1 answer

Adding dependencies into deps.edn in Spacemacs

I’m trying to add dependencies to deps.edn typing SPC r a p. When I select a dependency, I get the following message: cljr--insert-into-leiningen-dependencies: Search failed: ":dependencies". So apparently clj-refactor doesn’t recognize my deps.edn…
0
votes
1 answer

http/post Anti-forgery token with :edn-params

I have the following setup: Macchiato framework for the backend (i.e. ClojureScript on node.js), which models handling on Ring. Frontend consisting of a small React App to edit data stored in an atom (tracking various inputs). I want to make the…
Phylax
  • 189
  • 10