lasio icon indicating copy to clipboard operation
lasio copied to clipboard

Write las ascii object to memory as JSON

Open s0rhe1m opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. I need to send my edited las file to an API, but I dont want to send the lasio object. I want to send the LAS ascii object.

Describe the solution you'd like Ability to write ascii to memory using lasio.

Describe alternatives you've considered writing the file to local disk and reading it.

Additional context OSDU

s0rhe1m avatar Dec 15 '21 13:12 s0rhe1m

Lasio can write the Lasio object out to the text formats: csv, and json.

csv

LASFile.to_csv(file_ref, mnemonics=True, units=True, units_loc='line', **kwargs)

json

LASFile.to_json()

or

json.dumps(LASFile, cls=las.JSONEncoder)

dcslagel avatar Mar 10 '22 05:03 dcslagel

At the moment the only way to serialise the complete LASFile lasio object is to write it back to LAS, so I have tagged this as an enhancement.

kinverarity1 avatar Apr 20 '22 01:04 kinverarity1