Hey im looking at a YML file and i want to to some algorithms and compare values on it but i was wondering what is the best way to do so. I am thinking of creating a lot of objects but I know that can be very inefficient. Is there a way i could just read the YML file one section at a time and make my own methods to compare it?
here is an example of a part of the YML file im working with.
1:
type: item
item:
material: GRASS
quantity: 64
buyPrice: 50
sellPrice: 5
slot: 0
2:
type: item
item:
material: DIRT
quantity: 64
buyPrice: 30
sellPrice: 3
slot: 1
I need to get Material, Quantity, Buy price, and Sell price. I also will need to compare different "blocks" to other "blocks"
The file can be upwards of 2000 lines and it will change. I do not have to change any part of the file only read.