toJSON method on ksf collections
correct logic for getOrCreate on ressourcesManager