Questions tagged [rapture.io]

Rapture I/O is a fledgling library for Scala which provides a consistent, intuitive and extensible API for handling common I/O operations, such as sending HTTP requests and streaming data between files, URLs and sockets.

Rapture I/O is a fledgling library for Scala which provides a consistent, intuitive and extensible API for handling common I/O operations, such as sending HTTP requests and streaming data between files, URLs and sockets.

http://rapture.io/

9 questions
6
votes
1 answer

Create a temporary file from a base64 string with rapture-io

So, basically I want to create a temporary file from a base64 string content. Right now, I'm doing this with native java-io functions. But I would like to achieve the same result using the rapture-io library for scala. So my question would be, is…
maya.js
  • 1,147
  • 12
  • 25
1
vote
1 answer

How to delete files on Windows with Rapture IO

I'm writing Scala code. What is the correct path schema for writing a URI when using Rapture to operate with files on Windows? I have added the following dependencies: libraryDependencies += "com.propensive" %% "rapture" % "2.0.0-M3"…
leia
  • 13
  • 3
1
vote
1 answer

How to parse a JSON with an unknown schema in rapture-json?

I'm using Rapture JSON to parse a JSON message this way for { id <- parsedJson.inputEvent.fields.id.as[String] inputFields <- parsedJson.fieldSet.fields.as[Map[String, Any]] additionalFields <- extractAdditionalFields(parsedJson) }…
Chobeat
  • 3,445
  • 6
  • 41
  • 59
1
vote
1 answer

Get request with Rapture Http

I'm building an API with Rapture in Scala and having trouble resolving an issue with an implicit not being in scope. Here is the output from the error that I'm receiving. [error]…
Petesta
  • 1,623
  • 3
  • 19
  • 29
1
vote
1 answer

Creating a simple file using Rapture.io in scala

I'm trying to run a very simple example using Rapture.io. Not sure what I'm missing here? scala> import rapture.io._ import rapture.io._ scala> import rapture.core._ import rapture.core._ scala> val x = File / "tmp" / "a.txt" :20: error:…
Soumya Simanta
  • 11,523
  • 24
  • 106
  • 161
0
votes
2 answers

Scala JSON Rapture API throws exception

I am trying to use rapture.io Scala JSON parser to parse a JSON value (rows) that looks like this: { rows: [ [ null, "2016-11-16T15:43:18.000Z", { "p": 1, "q": 2 }, …
Darth.Vader
  • 5,079
  • 7
  • 50
  • 90
0
votes
1 answer

Extract type, key and value from Rapture JSON object

I'm using Rapture JSON with Argonaut backend (can change that if necessary). Given an arbitrary JSON string, I need to parse it as a flat object (no nested JSON objects) to ideally obtain a list of tuples (fieldName, fieldType, fieldValue) for each…
sscarduzio
  • 5,938
  • 5
  • 42
  • 54
0
votes
0 answers

How to write to a file using rapture-io

I am trying to write to a file using rapture-io. I would expect this to at least compile (sorry for importing the world, trying to get it to work): import rapture.uri._ import rapture.io._ import rapture.fs._ import rapture.core._ import…
jedesah
  • 2,983
  • 2
  • 17
  • 29
0
votes
1 answer

How to open a file resource with rapture-io?

I would have expected this to work, but it does not. import rapture.uri._ import rapture.io._ val file = uri"file:///testFile.txt" It fails to compile with the following error: not found: value File val file = uri"file:///testFile.txt" …
jedesah
  • 2,983
  • 2
  • 17
  • 29