Fork me on GitHub
#clojure
<
2022-05-25
>
V09:05:52

I want to generate json objects based on a json schema, is there a clojure library that can help me do that?

Alexis Schad09:05:37

You mean generate random objects that matches the schema?

V09:05:00

Yes exactly

Martynas Maciulevičius10:05:03

Try these (it won't be JSON and won't be from JSON schema but you can easily make JSON out of it): https://github.com/metosin/malli https://github.com/plumatic/schema

👆 1
V11:05:34

Thank you all 🙂 I will try out your suggestions

V09:05:18

Or do i have to invent something myself?

vlaaad14:05:19

is there a library that provides db-table-like persistent data structures? I'm looking for column-oriented data structure, with assoc/dissoc support, with ability to index some columns for efficient access, and preserve indexes on modifications...

vlaaad14:05:55

yes, something like datascript but maybe more lightweight? e.g. only index access, no querying...

vlaaad14:05:31

does tech.ml.dataset support attaching indexes to the dataset for efficient access? does it preserve the indexes on adding/removing rows?

🤷 1
vlaaad14:05:19

and re datascript — I'd like to set my own columns instead of eavt

Ferdinand Beyer14:05:58

OK. Sorry, then I don’t know 🙂

lilactown16:05:06

it has helpers to store your data in a table-like form, using plain clojure maps/sets/vectors

lilactown16:05:19

it uses EQL for resolving joins

wotbrew17:05:16

It is not column oriented, its just clojure collections with extra indexes

wotbrew17:05:23

may or may not be what you are after

sansarip21:05:18

Similar to idx [I think], there’s also compound https://github.com/riverford/compound

❤️ 1
vlaaad06:05:48

Thanks y'all, I'll try these libraries!

sleepyfox07:05:07

Why not just SQLlite? It's supported out of the box by the JDBC driver.

sleepyfox07:05:33

I.e. you don't even need an additional library for it.

vlaaad08:05:38

But muh persistent data structures

John Conti16:05:08

Nice thread.