I can't comment on the whole crazy world of JSON, but it's a shame to think
of all the coal-fired watts spent unnecessarily parsing UUIDs. If all you
need is a string, there is no dishonor in letting it be a string.
> I was made to wonder how the rest of the world lives!
>
> P.S. Also, never
Hello,
I hope all are safe and doing well in these perplexing times.
Today, again, while working on the server side of an HTTPS api that
transparently serves clients who speak different languages (some JSON and
some edn, using the delightful muuntaja
<https://github.com/metosin/muunt
As you point out, symbols in edn have no inherent meaning; it's entirely up
to how you interpret them. However, if you saw the symbol
"clojure.core/conj" in an edn file, then the chances are that it's intended
to refer to a Clojure function. Similarly, the symbol "
Thank you for responses.
The last two arguments do not resolve the doubt, however:
1. symbols also implement IFn:
(require 'clojure.edn)
('a (clojure.edn/read-string "{a 1 b 2}"))
=> 1
2. EDN does not specify any evaluation model, so how can a symbol d
ding map values.
>
> {username "vasya" email "a@b.c"}
>
Sure, but if I'm reading the edn spec correctly, the intention is that
symbols *in isolation* should identify something. So if I just wrote:
username
What does that identity? If it has no identity bey
I think James talking about resolution of values when he said "designates",
not "the value bound to a key in the map." In other words, the keyword
:email resolves to the keyword :email, whereas the symbol clojure.core/vec
resolves to a function.
Keywords-as-keys give you some benefits when you'
Regarding the idea that a keyword is an identifier that designates itself,
while a symbol is a keyword that designates something else.
Keys in config file map do not designate themselves, they designate the
corresponding map values.
{username "vasya" email "a@b.c"}
Here the EMAIL symbo
In edn, a keyword is an identifier that designates itself, while a symbol
is a keyword that designates something else.
This means keys in a map should generally be keywords, unless they identify
something beyond themselves. For example:
{:profiling/function-count {clojure.core/vec 10}}
On
My personal opinion is to prefer keywords, and prefer less preprocessing of
the configuration before the program uses it.
If it gets to a place where the configuration changes a lot, and a
"natural" (read: clojure-like) expression of the configuration in EDN has
either a lot of redu
I'm working on a config file format in EDN, and in doubt: should I use
keywords or symbols as map keys.
After all, the colon is an extra keyboard press - an extra effort for users.
As EDN parser doesn't evaluate expressions, there is no need to quote
symbols when using them as ED
There are edn impls in at least 15 languages so the problem is wider than just
java and js.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are
erent to each
regex library. Worse (or better), suppose you wrote a Java regex into the
EDN file, and tried to read the EDN in JS, and the regex constructor threw
an exception?
A slightly more esoteric issue might also arise.
https://github.com/edn-format/edn says,
"edn is a system for
Thanks for the reply! Glad to have confirmations.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
T
Not adding much to what you've already said, but a custom reader tag is
exactly what I would reach out for in this situation.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that post
Hi, just writing this out of pure curiosity.
Background:
1. I thought I could write regex literals like this in an edn file
containing configurations:
:some-parameter #"foo"
But reading this with e.g. clojure.edn/read-string causes an error
No dispatch macro for: "
2.
That's really taking Friday afternoon commits to the next level!
On 30 June 2018 at 21:42, Edwin Watkeys wrote:
> Hey all,
>
> Have you ever wanted to read Clojure or EDN without using Clojure(Script)?
> If so, feel free to check out CRNTL (C Reader for the Next Thousand Lisps
Hey all,
Have you ever wanted to read Clojure or EDN without using Clojure(Script)?
If so, feel free to check out CRNTL (C Reader for the Next Thousand Lisps)
at:
https://github.com/thunknyc/crntl
CRNTL is a new project and is incomplete, but I hope some will find it
useful as-is. I wrote it
I mean just print-dup and print-meta should be enough !
Le vendredi 30 mars 2018 14:31:04 UTC+2, LaurentJ a écrit :
>
> Yes we will set print-dup, print-meta, print-level and print-length to
> have a properly formatted edn file.
>
> Le vendredi 30 mars 2018 05:55:50 UTC+2,
Yes we will set print-dup, print-meta, print-level and print-length to have
a properly formatted edn file.
Le vendredi 30 mars 2018 05:55:50 UTC+2, Didier a écrit :
>
> Ya, I'd write a wrapping fn, like ->edn which internally binds everything
> to what it should be, maybe e
Ya, I'd write a wrapping fn, like ->edn which internally binds everything to
what it should be, maybe even declares some extra print defmethod if you need
custom edn serialization, and returns the edn.
--
You received this message because you are subscribed to the Google
Groups "C
I guess we will do that and provide an helper function in an util namespace
to write an EDN file safely :/
By the way does binding *print-dup* to true isn't enough to prevent any
interaction of other options like : *print-length* *print-level* ?
Le jeudi 29 mars 2018 21:16:54 UTC+2,
nge 10))
(0 1 2 3 4 ...)
If you don't know how this works (or differs to lexical binding via let)
you can read up on vars here:
https://clojure.org/reference/vars
Hope this helps!
R.
On 29 March 2018 at 15:57, LaurentJ wrote:
> Hello,
>
> A funny bug today, our pipeline was bro
Hello,
A funny bug today, our pipeline was broken because of an EDN file with
ellipsis in it.
It appears that the file was generated from a Clojure env with
*print-length* configured.
So as many have asked, do we have a better way to write EDN file other than
using prn ?
For the moment what
keep a reference to the return value of reading in the
config file that you can pass as the first argument to the function
google-apps-clj.credentials/get-auth-map or just pass (edn/read-string
(slurp "config/google-creds.edn")) as the first argument directly.
While I haven't used t
down votefavorite
<https://stackoverflow.com/questions/49245041/how-to-call-a-function-read-from-an-edn-file#>
Clojure noob here.
After reading in the google-creds.edn file like so:
"(edn/read-string (slurp "config/google-creds.edn"))"
How do I call the function get
I've had one too on similar lines for quite some time
https://github.com/jaju/properties-clj
Primarily used for the `properties` format, but it supports EDN too via the
`read-edn` function. This library uses the almost-BASH syntax for picking
env variables with default
${USER:some-user}
l "jdbc:postgresql://db.example.org:5432/accounts"]}
:web-server
{:port 8192}}
On Fri, Feb 16, 2018 at 2:20 PM, Howard Lewis Ship wrote:
>
> com.walmartlabs/dyn-edn 0.1.0
>
> Tiny library to allow dynamic data when parsing EDN; useful for
> configuration files.
Oh, yea, very similar. I wasn't tracking, and the overlap is significant.
dyn-edn is just one part, packaged as small as possible, about 90 lines of
code. aero looks similar to io.aviso/config (itself very small), but big
enough to be noticable.
dyn-edn is intended to just plug into wha
com.walmartlabs/dyn-edn 0.1.0
Tiny library to allow dynamic data when parsing EDN; useful for
configuration files.
https://github.com/hlship/dyn-edn
For example:
{:connection-pool
{:user-name #dyn/prop [DB_USER "accountsuser"]
:user-pw #dyn/prop DB_PW
:url #dyn/join ["
Thanks again to Marcelo!
Various bugfixes to handling of derefs, non-printable nodes, anonymous
functions, metadata, and key order in maps.
specter-edn
https://github.com/maitria/specter-edn/
Format-preserving Specter path for EDN and Cloure code.
There is one specter path: SEXPRS. This
More thanks to Marcelo!:
- Fix for nils in collections
- Fix for rebuilding of maps
- Ensure whitespace between adjacent tokens after a transform
Also, the code in the README has been corrected.
specter-edn
https://github.com/maitria/specter-edn/
Format-preserving Specter path for
And, I forgot the link: https://github.com/maitria/specter-edn
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please
Thank you to Marcelo Nomoto for bug fixes and updating the dependencies!
specter-edn
Specter paths for working with formatted EDN and Cloure code.
There is one specter path: SEXPR. This navigates to a sequence of
s-expressions parsed from a string.
For the transform case, specter-edn preserves
ixed.)
>
>
>
> On Friday, January 13, 2017 at 3:19:03 PM UTC-6, david swift wrote:
>>
>> I was curious and wondering if it is possible (and if so how) to store
>> Clojure spec's in edn files?
>>
>> I've an idea of (dynamically) loading spec's from
ssible (and if so how) to store
> Clojure spec's in edn files?
>
> I've an idea of (dynamically) loading spec's from say a resource/spec
> folder of app using some form of a lookup function and then use that
> analysis the code;
> I say this as I was looking to impl
I was curious and wondering if it is possible (and if so how) to store
Clojure spec's in edn files?
I've an idea of (dynamically) loading spec's from say a resource/spec
folder of app using some form of a lookup function and then use that
analysis the code;
I say this as I
edn-java [1] is a parser and printer for edn [2].
This release:
* Can read namespaced maps as per CLJ-1910 [47]
* Throws an exception when asked to read a map or set with duplicates [49]
It should be appearing on Maven Central shortly.
// Ben
[1] http://edn-java.bpsm.us
[2] https
In general Java it is up to the creator of a "stream" to close it, the same
applies to Clojure pretty much.
Java has "try with resources" and in Clojure you can use "with-open":
(with-open [rdr (open-the-reader)]
(edn/read rdr {}))
This will ensure .close is c
Running on Windows, I found that I could not delete an edn file that I had
read from. I've looked at a few examples of reading edn, and none of them
seem to suggest that the user code should explicitly call close() on the
Java object, or that it needs to use with-open. Should I be
Hi!
I've been working on a command line tool for edn processing and pretty
printing. The project is available at https://github.com/jonase/eq and it
is heavily inspired by jq (https://stedolan.github.io/jq/). Eq could be a
very useful tool if you're working a lot with edn data (for e
Hello, all! Here's a new library which works with specter, which will
hopefully be useful for writing code transformations and queries.
specter-edn
Specter paths for working with formatted EDN and Cloure code.
There is one specter path: SEXPR. This navigates to a sequence of
s-expres
When *print-length* and *print-level* are set the forms printed are not
always parseable as EDN. See this example:
(require 'clojure.edn)
(clojure.edn/read-string (pr-str {:a 1 :b 2 :c 3 :d 4}))
=> RuntimeException Map literal must contain an even number of forms
This occurs because t
text,
>> therefore it isn’t a great choice.
>>
>> The choice of delimiter seems independent of how to render the value in
>> question. To my mind there's exactly one correct, and obviously correct, way
>> to render an EDN value which is a string containing the s
+1 for |
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email
t as either the literal 2 or a
>> string containing 2. To interpret it correctly you must know more than
>> just the literal text, therefore it isn’t a great choice.
>>
>
> The choice of delimiter seems independent of how to render the value in
> question. To my mind the
ining 2. To
> interpret it correctly you must know more than just the literal text,
> therefore it isn’t a great choice.
>
> The choice of delimiter seems independent of how to render the value in
> question. To my mind there's exactly one correct, and obviously correct, way
&g
how to render the value in
question. To my mind there's exactly one correct, and obviously correct,
way to render an EDN value which is a string containing the single
character \2, and it's the second one:
"2"
If you want to refer to the value by wrapping it in quotation mark
baz")|
>
>
> --
> https://google.github.io/styleguide/objcguide.xml?showone=Implementation_Comments#Implementation_Comments
>
> пятница, 13 ноября 2015 г., 13:55:40 UTC+2 пользователь Colin Yates
> написал:
>>
>> Hi all,
>>
>> Can we, the community
t;https://google.github.io/styleguide/objcguide.xml?showone=Implementation_Comments#Implementation_Comments>
>
> пятница, 13 ноября 2015 г., 13:55:40 UTC+2 пользователь Colin Yates написал:
> Hi all,
>
> Can we, the community agree a consistent way of rendering Clojure EDN when w
s://google.github.io/styleguide/objcguide.xml?showone=Implementation_Comments#Implementation_Comments
пятница, 13 ноября 2015 г., 13:55:40 UTC+2 пользователь Colin Yates написал:
>
> Hi all,
>
> Can we, the community agree a consistent way of rendering Clojure EDN when
> we report it i
As a newbie, a red warning flag pops up when I see a back tick. :-)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with y
t; >
> > Hi all,
> >
> > Can we, the community agree a consistent way of rendering Clojure EDN
> when we report it in info or error. For example, given the EDN "2" (i.e. a
> string containing a single character 2) I have seen various libraries
> render it as:
&
AM, Colin Yates wrote:
>
> Hi all,
>
> Can we, the community agree a consistent way of rendering Clojure EDN when we
> report it in info or error. For example, given the EDN "2" (i.e. a string
> containing a single character 2) I have seen various libraries render
se I am proposing here.
>
>> On 13 Nov 2015, at 13:19, Atamert Ölçgen > <mailto:mu...@muhuk.com>> wrote:
>>
>> Hi Colin,
>>
>> Why not just "2"?
>>
>> On Fri, Nov 13, 2015 at 1:55 PM, Colin Yates > <mailto:colin.ya...@gmail.co
t; wrote:
>
>> Hi all,
>>
>> Can we, the community agree a consistent way of rendering Clojure EDN
>> when we report it in info or error. For example, given the EDN "2" (i.e. a
>> string containing a single character 2) I have seen various libraries
>>
uot;?
>
> On Fri, Nov 13, 2015 at 1:55 PM, Colin Yates <mailto:colin.ya...@gmail.com>> wrote:
> Hi all,
>
> Can we, the community agree a consistent way of rendering Clojure EDN when we
> report it in info or error. For example, given the EDN "2" (i.e. a
Hi Colin,
Why not just "2"?
On Fri, Nov 13, 2015 at 1:55 PM, Colin Yates wrote:
> Hi all,
>
> Can we, the community agree a consistent way of rendering Clojure EDN when
> we report it in info or error. For example, given the EDN "2" (i.e. a
> string containin
Hi all,
Can we, the community agree a consistent way of rendering Clojure EDN when
we report it in info or error. For example, given the EDN "2" (i.e. a
string containing a single character 2) I have seen various libraries
render it as:
- 2
- "2"
- ["2"]
edn-java [1] is a parser and printer for edn [2].
This release:
* Teaches the default parser to produce values that can participate in Java
serialization. [3]
It should be appearing on Maven Central shortly.
// Ben
[1] http://edn-java.bpsm.us
[2] https://github.com/edn-format/edn
[3] https
Ken Restivo writes:
> Only when conch is called, is this error generated. Not shelling out
> makes the problem go away. So it's an interaction between pr-str,
> conch and/or clojure.java.shell, and Timbre-- all three of which are
> manipulating *out* which I'm guessing is not thread-safe.
You ca
; > >
> > > > However, I'm also using Timbre for logging.
> > > >
> > > > My nice data structure is getting corrupted by INFO and DEBUG and other
> > > > log messages from Timbre.
> > > >
> > > > Is there any way to turn
Restivo wrote:
> >
> > > I was trying to save a data structure using prn-str.
> > >
> > > However, I'm also using Timbre for logging.
> > >
> > > My nice data structure is getting corrupted by INFO and DEBUG and other
> > > log messag
ying to save a data structure using prn-str.
> >
> > However, I'm also using Timbre for logging.
> >
> > My nice data structure is getting corrupted by INFO and DEBUG and other
> > log messages from Timbre.
> >
> > Is there any way to turn a Clojure dat
og messages from Timbre.
>
> Is there any way to turn a Clojure data structure into EDN without mucking
> around with things like pr-str that use *out*, which apparently is used for
> logging, among other things?
>
> -ken
>
> --
> You received this message because you are
I was trying to save a data structure using prn-str.
However, I'm also using Timbre for logging.
My nice data structure is getting corrupted by INFO and DEBUG and other log
messages from Timbre.
Is there any way to turn a Clojure data structure into EDN without mucking
around with things
Leon spot on, maybe ill get to implement such a thing :)
On Friday, May 29, 2015 at 2:44:04 AM UTC+3, ronen wrote:
>
> Gary your last comment hits what I look for exactly:
>
> "If you are looking for an encoding of clojure's syntax extensions into
> pure edn reader
Gary your last comment hits what I look for exactly:
"If you are looking for an encoding of clojure's syntax extensions into
pure edn reader tags (as my crystall ball tells me you might be), I haven't
encountered such a thing yet, even though it's conceivable."
My use
d
requires and imports. Clojures namespace API is very mature and concise so
an implementing it should be fun.
On Wednesday, May 27, 2015 at 3:02:30 PM UTC+2, ronen wrote:
>
> Hey, I'm looking for an edn data read for clojure functions (similar to
> https://github.com/Datomic/day-of-dato
know that it is just as bad as read security-wise.)
Or perhaps you already have a clear idea of what you would want to do with
the data structures in your edn file, and you're actually asking about how
to register your custom literal reader with the edn reader?
On Thursday, 28 May 2015, Herwig H
2015-05-27 18:14 GMT+02:00 ronen :
> Ok ill expand the question a bit hoping to make it clearer :)
>
Still not clear to me, but I'll try to expand a bit in the hope of showing
what is unclear.
Clojure EDN has support for literal tags
> <https://github.com/edn-format/edn#ins
Ok ill expand the question a bit hoping to make it clearer :)
I'm well aware of read/read-string and the security implications they bring
(not interested in those),
Clojure EDN has support for literal tags
<https://github.com/edn-format/edn#inst-rfc-3339-format> and the ability of
in edn
format. They have limitations, of which I don't remember them all, but
IIRC at least one is that they cannot read back in records in some of the
ways that Clojure code can print them out. They work well when the data
you have is just lists, vectors, sets, maps, and primitive types.
Hey, I'm looking for an edn data read for clojure functions (similar
to
https://github.com/Datomic/day-of-datomic/blob/master/resources/day-of-datomic/clojure-data-functions.edn)
Is there any known implementation?
Thanks
--
You received this message because you are subscribed to the G
ssues/2
I intend to work on these problems in the near future.
Thanks!
Ryo
2015年4月11日土曜日 9時11分14秒 UTC+9 Geoff Salmon:
>
> Hi Ryo
>
> Thanks for releasing this. I've started using it for a configuration file
> that was previously an edn file. I was mainly interested in the im
Hi Ryo
Thanks for releasing this. I've started using it for a configuration file
that was previously an edn file. I was mainly interested in the import and
include features but have now started using the eval macro to replace some
repetitive parts of the file with for loops. I'll
Hi all,
I'd like to announce the release of Baum.
https://github.com/rkworks/baum
Baum, my first public library for Clojure, is designed to create
"self-contained" configuration files.
It allows you to include the following things in your configuration files:
- References to external files
-
Thanks for this breakdown; a lot of what you're saying about Transit is
stuff I had inferred from prior announcements, but it's still enlightening
to see an explicit comparison to Edn and Fressian.
On Sunday, March 15, 2015 at 7:51:55 PM UTC-7, Alex Miller wrote:
>
> Hi Ryan,
&
tion and deserialization. I'll copy this
> small usage example from the README to give you a sense of how it works:
>
> public interface Album extends DynamicObject {
> @Key(":artist") String getArtist();
> @Key(":album") String getAlbum();
> @Key(&
rialization and deserialization. I'll copy this
> small usage example from the README to give you a sense of how it works:
>
> public interface Album extends DynamicObject {
> @Key(":artist") String getArtist();
> @Key(":album") String getAlbum();
> @
ist") String getArtist();
> @Key(":album") String getAlbum();
> @Key(":tracks") int getTracks();
> @Key(":year") int getYear();
> }
>
> String edn = "{:artist \"Meshuggah\", :album \"Chaosphere\", :tracks 8, :year
typed values.
edn is the best choice for human-readable data. It is however, less
efficient to transmit and depends on writing a high-performance parser -
this is a high bar in some language environments. edn is most attractive
right now to Clojure users b/c of its proximity to Clojure itself
le from the README to give you a sense of how it works:
public interface Album extends DynamicObject {
@Key(":artist") String getArtist();
@Key(":album") String getAlbum();
@Key(":tracks") int getTracks();
@Key(":year") int getYear();
}
String ed
http://www.compoundtheory.com/clojure-edn-walkthrough/ is a nice read
around this as well.
On Tuesday, 24 February 2015 21:40:14 UTC, Colin Yates wrote:
>
> I am sending instances of defrecords from clojurescript via transmit/edn
> and getting:
>
> 2015-Feb-24 19:23:52 + d
Thanks miner. I see, so I have to treat each record individually. Never
mind - I was only using defrecord so I could dispatch on class and
protocols. multi-methods and keywords will suffice here.
Thanks again.
On Tuesday, 24 February 2015 22:04:55 UTC, miner wrote:
>
> The edn format do
The edn format does not include records. The transit README gives an example
of how to write a transit handler for a record. See the section on
extensibility.
https://github.com/cognitect/transit-format#extensibility
<https://github.com/cognitect/transit-format#extensibility>
Before t
I am sending instances of defrecords from clojurescript via transmit/edn
and getting:
2015-Feb-24 19:23:52 + dev-os-mbp.local DEBUG [taoensso.sente] - Bad
package: [[:client/message #health.shared.domain.PingCommand{}]]
(clojure.lang.ExceptionInfo: No reader function for tag
edn-java [1] is a parser and printer for edn [2].
This release:
* Incorporates a patch from 'redahe' to fix issue 40 where < and >
were not recognized as symbols. [3]
It is available on Maven central as I write this.
[1] http://edn-java.bpsm.us
[2] https://github.com/ed
Update.
I've played around with pr-str and prn-str in the repl, and discovered that
they both should work fine. In fact it turns out that my problem is nothing
to do with Edn or anything Clojuresque at all, and in fact everything to do
with the database that's responsible for t
Dwelly > wrote:
>
>> I've recently been serialising some data using Edn, and to date this has
>> caused no problems. During some tests today, I serialised a string
>> representing a file path that originated on a windows machine "\My
>> Documents\somedo
On 25 November 2014 at 12:23, Andy Dwelly wrote:
> I've recently been serialising some data using Edn, and to date this has
> caused no problems. During some tests today, I serialised a string
> representing a file path that originated on a windows machine "\My
> Docum
Hi Andy,
If I stick with Edn are there any other gotchas that should be sanitised ?
The specs of String literals is a bit implicit :
https://github.com/edn-format/edn#strings refers to
https://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.6 .
I think there are no ways to
I've recently been serialising some data using Edn, and to date this has
caused no problems. During some tests today, I serialised a string
representing a file path that originated on a windows machine "\My
Documents\somedoc.txt". Edn throws a runtime exception when reading this
point in
your tree and then returning an edited version.
On Friday, October 10, 2014 2:28:26 PM UTC-4, Dustin Getz wrote:
>
> I have an arbitrarily nested EDN value stored in an atom in ClojureScript.
>
> What is the best way to make edits to an arbitrary subtree of this value?
>
-
Can you use update-in or assoc-in?
On Friday, October 10, 2014 2:28:26 PM UTC-4, Dustin Getz wrote:
>
> I have an arbitrarily nested EDN value stored in an atom in ClojureScript.
>
> What is the best way to make edits to an arbitrary subtree of this value?
>
--
You received this
I have an arbitrarily nested EDN value stored in an atom in ClojureScript.
What is the best way to make edits to an arbitrary subtree of this value?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email
I'm sure you can, but you would need to implement your own custom methods
to do it, using :readers or :default options in edn/read / edn/read-string
It would very much depend on the format of the outputted EDN as to which
approach to take.
Mark
On 9 October 2014 07:12, Timur wrote:
Hi everyone,
One can use into-edn [1] to convert from Java objects to EDN structures.
Is there a way to convert EDN structures to their original Java objects?
Regards,
Timur
[1] https://github.com/thebusby/into-edn
--
You received this message because you are subscribed to the Google
g serialize [x]
>
> {:post [(= x (edn/read-string %))]}
>
> (pr-str x))
>
>
> - James
>
>
> On 11 July 2014 20:13, Ignacio Thayer wrote:
>
>>
>> we noticed this possibility of edn injection when mixing validated and
>> unvalidated data into a single
Ring uses a post condition to guard against this:
(defn- ^String serialize [x]
{:post [(= x (edn/read-string %))]}
(pr-str x))
- James
On 11 July 2014 20:13, Ignacio Thayer wrote:
>
> we noticed this possibility of edn injection when mixing validated and
> unvalidated data into
we noticed this possibility of edn injection when mixing validated and
unvalidated data into a single edn blob. it's hard to exploit, and in
some sense it's obvious but i thought i'd share it since it caught us
off-guard and requires greater care than when serializing w/ json for
1 - 100 of 240 matches
Mail list logo