Several books, articles, and blogs have been written which consider the law within the fictional world of the Harry Potter series. These pieces consider how alternate systems of law have been created, or how real systems of law may be interpreted.
This article by several law professors, including Brandeis School of Law's Professor Timothy Hall, explores various aspects of law & culture as seen in Harry Potter.
This is a book about jurisprudence--or legal philosophy. The legal philosophical texts under consideration are unorthodox, and include Harry Potter as instances of lex populi--"pop law". The texts are considered "jurisprudentially", with an eye to their hidden legal philosophical meanings.