Sorry, I am stupid. I misunderstood the problem entirely. Escaped quote
marks are never really the problem. The real issue is that this works for
us:
{ "money" : "10", "contact_name" : "Martha Vena" }
and this doesn't work for us:
"{ \"money\" : \"10\", \"contact_name\" : \"Martha Ve
I have not yet found a solution for this problem. If I do this:
(.getBytes v "UTF-8")
Then in Redis the quotes are escaped 100% of the time. What is the standard
way to handle this? I do see this on StackOverflow:
http://stackoverflow.com/questions/12423071/how-to-remove-escape-characters-from
Hmm, well, I am grateful to you for running such a detailed test, and I
should have tested this myself:
>The actual bytes stored at the "test" key are 0x61 0x22 0x62
However, something in our code fails when the quote marks are escaped, but
everything works the way we expect when the quote ma
If I launch "lein repl" I run into this problem:
garlic.guide=> (ns-publics 'garlic.guide)
CompilerException java.lang.RuntimeException: Unable to resolve symbol:
ns-publics in this context,
compiling:(/tmp/form-init8901241567953840232.clj:1:1)
I have to type out the namespace name "clojure.
I am sorry, I should have explained this sooner. When I do this:
(.getBytes document-as-string "UTF-8")
The quote marks are always escaped. When I do this:
document-as-byte-array (bytes (byte-array (map (comp byte int)
document-as-string)))
The quote marks are sometimes escaped, but
> As for the escaped quotes, you may be using pr or prn to print, or maybe
you are
> using pr-str to produce the string representation. I can't be sure.
At the moment I create the string like this:
document-as-string (str "{\"transaction-id\" : \"" transaction-id
"\", \"message\" :
Thank you. Yes, we have complete control over both apps.
On Wednesday, July 8, 2015 at 8:58:53 PM UTC-4, Francis Avila wrote:
>
> Who is saving these strings, and who is reading them? Do you have complete
> control over both apps, or does one of them need to be aligned with the
> other?
>
> I
And I have another stupid question. Using the above code, I am sometimes
getting strings in Redis that have escaped quotation marks, like this:
" \"transaction-id\" : \" 1ec47c2e-21ee-427c-841c-80a0f89f55d7 \"
\"debrief\" : \" Susan Hilly at Citi called to get a quotation for
discounted weekl
Francis Avila,
Thank you for your response. The Java app is using Jedis and the Clojure
app is using Carmine. I'm wondering if you can suggest what you think would
be the easiest way to allow these 2 apps to understand each other's strings?
You were correct about how unsafe the above code was.
For anyone else like me, who has learned Clojure but knows nothing about
Java, you need to convert to a byte array and then use carmine/raw to write
to Redis. So in a let statement I have something like this:
document-as-string (str "{\"transaction-id\" : \"" transaction-id "\",
\"debrief
Ah, I just saw this, which might help me:
https://github.com/ptaoussanis/carmine/issues/83
On Wednesday, July 8, 2015 at 4:35:49 PM UTC-4, gingers...@gmail.com wrote:
>
>
> I am not sure if this is a Clojure question or a Java question. I don't
> know Java, so I could use whatever help folks ca
I am not sure if this is a Clojure question or a Java question. I don't
know Java, so I could use whatever help folks can offer.
"primitive string" here means what I can write when I am at the terminal.
We have 2 apps, one in Clojure, one in Java. They talk to each other via
Redis. I know the
Sean Corfield,
Thanks for this. I can go through my code and try to remove all of the uses
of JodaTime in my own code, but, as that would be some work, I'd like to
first confirm the diagnoses. Can you think of a way I might be able to
confirm that Joda is, in fact, the problem?
lawrence
If I do this:
json-for-nlp (cheshire/generate-string map-for-nlp)
byte-array-json (.getBytes json-for-nlp)
I assume I now have an array of bytes. But if I do:
(.length byte-array-json)
I get:
No matching field found: length for class
Why is that?
More info below.
> If the worst comes to the worst, you may need to run the NLP module
> and the Clojure code in separate JVMs using some form of IPC to exchange
data.
That is what I'm looking at right now, though I've also been told that I
absolutely must have this working by tomorrow morning, so I'm a littl
But we had this working, so I don't think the conflict is between the NLP
and the web app which uses Compojure.
On Monday, June 29, 2015 at 6:38:40 PM UTC-4, Gary Verhaegen wrote:
>
> Assuming there is a version that works for both dependencies, you can
> manually fix it in your own project.
> Otherwise, as far as I can tell, you're stuck. Maybe you can try using
> an older clj-time?
That's an interesting idea. I see that this:
[clj-time "0.4.5"]
rolls back JodaTime to 2.1:
https://clojars.org/clj-time/versions/0.4.5
which is the same dependency as in the Jav
I think I have a conflict involving different libraries using different
versions of JodaTime. I have no idea how to fix this.
I have nearly the same problem as this:
http://stackoverflow.com/questions/21487476/maven-build-throws-jodatime-exception-at-runtime
However, in my case, I'm building
18 matches
Mail list logo